Warning: Can't use blame annotator:
svn blame failed on branches/version-2_5-dev/data/Smarty/templates/admin/products/product_class.tpl: バイナリファイル 'file:///home/svn/open/branches/version-2_5-dev/data/Smarty/templates/admin/products/product_class.tpl' に対しては blame で各行の最終変更者を計算できません 195004

source: branches/version-2_5-dev/data/Smarty/templates/admin/products/product_class.tpl @ 20617

Revision 20617, 14.1 KB checked in by nanasess, 13 years ago (diff)

#991 (商品規格登録での不具合)

  • r20612 の続き. ファイルアップロードに対応

#595 (不正なファイルアップロードが行われる可能性)

  • move_uploaded_file() を使用するよう修正
  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-smarty-template; charset=UTF-8
RevLine 
1<!--{*
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved.
6 *
7 * http://www.lockon.co.jp/
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 */
23*}-->
24<script type="text/javascript">//<![CDATA[
25$(function() {
26    $('input[id^=stock_unlimited_]').each(function() {
27        var index = $(this).attr('id').replace(/^stock_unlimited_/ig, '');
28        var checked = $(this).attr('checked');
29
30        if (checked) {
31            $('#stock_' + index)
32                .attr('readonly', true)
33                .css('background-color', '<!--{$smarty.const.DISABLED_RGB}-->');
34        }
35    });
36
37    $('input[id^=stock_unlimited_]').change(function() {
38        var index = $(this).attr('id').replace(/^stock_unlimited_/ig, '');
39        var checked = $(this).attr('checked');
40
41        if (checked) {
42            $('#stock_' + index)
43                .attr('readonly', true)
44                .css('background-color', '<!--{$smarty.const.DISABLED_RGB}-->');
45        } else {
46            $('#stock_' + index)
47                .attr('readonly', false)
48                .css('background-color', '');
49        }
50    });
51});
52//]]>
53</script>
54<h2>商品規格登録</h2>
55<form name="form1" id="form1" method="post" action="" enctype="multipart/form-data">
56<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
57<!--{foreach key=key item=item from=$arrSearchHidden}-->
58    <!--{if is_array($item)}-->
59        <!--{foreach item=c_item from=$item}-->
60        <input type="hidden" name="<!--{$key|h}-->[]" value="<!--{$c_item|h}-->" />
61        <!--{/foreach}-->
62    <!--{else}-->
63        <input type="hidden" name="<!--{$key|h}-->" value="<!--{$item|h}-->" />
64    <!--{/if}-->
65<!--{/foreach}-->
66<input type="hidden" name="mode" value="edit" />
67<input type="hidden" name="product_id" value="<!--{$arrForm.product_id.value|h}-->" />
68<input type="hidden" name="upload_index" value="">
69<input type="hidden" name="total" value="<!--{$arrForm.total.value|h}-->" />
70<!--{* foreach key=name item=item from=$arrHidden *}-->
71<input type="hidden" name="<!--{$name}-->" value="<!--{$item|h}-->" />
72<!--{* /foreach *}-->
73<div id="products" class="contents-main">
74
75    <table>
76        <tr>
77            <th>商品名</th>
78            <td><!--{$arrForm.product_name.value|h}--></td>
79        </tr>
80        <tr>
81            <th>規格1<span class="attention">*</span></th>
82            <td>
83                <!--{assign var=key value="class_id1"}-->
84                <!--{if $arrErr[$key]}-->
85                <span class="attention"><!--{$arrErr[$key]}--></span>
86                <!--{/if}-->
87
88                <select name="<!--{$key}-->">
89                    <option value="">選択してください</option>
90                    <!--{html_options options=$arrClass selected=$arrForm[$key].value}-->
91                </select>
92            </td>
93        </tr>
94        <tr>
95            <th>規格2</th>
96            <td>
97                <!--{assign var=key value="class_id2"}-->
98                <!--{if $arrErr[$key]}-->
99                <span class="attention"><!--{$arrErr[$key]}--></span>
100                <!--{/if}-->
101                <select name="<!--{$key}-->">
102                    <option value="">選択してください</option>
103                    <!--{html_options options=$arrClass selected=$arrForm[$key].value}-->
104                </select>
105            </td>
106        </tr>
107    </table>
108    <div class="btn-area">
109        <ul>
110            <li><a class="btn-action" href="javascript:;" onclick="fnChangeAction('<!--{$smarty.const.ADMIN_PRODUCTS_URLPATH}-->'); fnModeSubmit('search','',''); return false;" ><span class="btn-prev">検索結果へ戻る</span></a></li>
111            <li><a class="btn-action" href="javascript:;" onclick="fnModeSubmit('disp','',''); return false;"><span class="btn-next">表示する</span></a></li>
112        <!--{if $arrForm.total.value > 0}-->
113            <li><a class="btn-action" href="javascript:;" onclick="fnModeSubmit('delete','',''); return false;"><span class="btn-next">削除する</span></a></li>
114        <!--{/if}-->
115        </ul>
116    </div>
117
118    <!--{if $arrForm.total.value > 0}-->
119
120    <!--{foreach item=item name=i from=$arrClassCat}-->
121        <!--{if $smarty.foreach.i.first}-->
122            <!--{assign var=cnt value=$smarty.foreach.i.total}-->
123        <!--{/if}-->
124    <!--{/foreach}-->
125
126    <div class="list-info clearfix">
127        <div class="btn"><a class="btn-normal" href="javascript:;" onclick="fnCopyValue('<!--{$cnt}-->', '<!--{$smarty.const.DISABLED_RGB}-->'); return false;"><span>一行目のデータをコピーする</span></a></div>
128        <p><span class="bold">アップロード可能な拡張子:</span><!--{$smarty.const.DOWNLOAD_EXTENSION}-->(パラメータ DOWNLOAD_EXTENSION)</p>
129    </div>
130
131    <!--{if $arrErr.check_empty}-->
132        <span class="attention"><!--{$arrErr.check_empty}--></span>
133    <!--{/if}-->
134
135    <table class="list" width="900">
136        <colgroup width="5%">
137        <colgroup width="9%">
138        <colgroup width="9%">
139        <colgroup width="9%">
140        <colgroup width="10%">
141        <colgroup width="10%">
142        <colgroup width="10%">
143        <colgroup width="10%">
144        <colgroup width="8%">
145        <colgroup width="8%">
146        <colgroup width="8%">
147        <tr>
148            <th><input type="checkbox" onclick="fnAllCheck(this, 'input[name^=check]')" id="allCheck" /> <label for="allCheck"><br>登録</label></th>
149            <th>規格1<br>(<!--{$arrClass[$class_id1]|default:"未選択"|h}-->)</th>
150            <th>規格2<br>(<!--{$arrClass[$class_id2]|default:"未選択"|h}-->)</th>
151            <th>商品コード</th>
152            <th>在庫数<span class="attention">*</span></th>
153            <th><!--{$smarty.const.NORMAL_PRICE_TITLE}-->(円)</th>
154            <th><!--{$smarty.const.SALE_PRICE_TITLE}-->(円)<span class="attention">*</span></th>
155            <th>商品種別<span class="attention">*</span></th>
156            <th>ダウンロード<br>ファイル名<span class="red"><br>上限<!--{$smarty.const.STEXT_LEN}-->文字</span></th>
157            <th>ダウンロード商品用<br>ファイル</th>
158        </tr>
159        <!--{section name=cnt loop=$arrForm.total.value}-->
160            <!--{assign var=index value=$smarty.section.cnt.index}-->
161
162            <tr>
163                <td class="center">
164                    <!--{assign var=key value="classcategory_id1"}-->
165                    <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
166                    <!--{assign var=key value="classcategory_id2"}-->
167                    <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
168                    <!--{assign var=key value="product_class_id"}-->
169                    <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
170                    <!--{assign var=key value="check"}-->
171                    <!--{if $arrErr[$key][$index]}-->
172                        <span class="attention"><!--{$arrErr[$key][$index]}--></span>
173                    <!--{/if}-->
174                    <input type="checkbox" name="<!--{$key}-->[<!--{$index}-->]" value="1" <!--{if $arrForm[$key].value[$index] == 1}-->checked="checked"<!--{/if}--> />
175                </td>
176                <td class="center">
177                    <!--{assign var=key value="classcategory_name1"}-->
178                    <!--{if $arrErr[$key][$index]}-->
179                        <span class="attention"><!--{$arrErr[$key][$index]}--></span>
180                    <!--{/if}-->
181                    <!--{$arrForm[$key].value[$index]|h}-->
182                    <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
183                </td>
184                <td class="center">
185                    <!--{assign var=key value="classcategory_name2"}-->
186                    <!--{if $arrErr[$key][$index]}-->
187                        <span class="attention"><!--{$arrErr[$key][$index]}--></span>
188                    <!--{/if}-->
189                    <!--{$arrForm[$key].value[$index]|h}-->
190                    <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
191                </td>
192                <td class="center">
193                    <!--{assign var=key value="product_code"}-->
194                    <!--{if $arrErr[$key][$index]}-->
195                        <span class="attention"><!--{$arrErr[$key][$index]}--></span>
196                    <!--{/if}-->
197                    <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" <!--{if $arrErr[$key][$index] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />
198                </td>
199                <td class="center">
200                    <!--{assign var=key value="stock"}-->
201                    <!--{if $arrErr[$key][$index]}-->
202                        <span class="attention"><!--{$arrErr[$key][$index]}--></span>
203                    <!--{/if}-->
204                     <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" <!--{if $arrErr[$key][$index] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> id="<!--{$key}-->_<!--{$index}-->" />
205                    <!--{assign var=key value="stock_unlimited"}--><br />
206                    <!--{if $arrErr[$key][$index]}-->
207                        <span class="attention"><!--{$arrErr[$key][$index]}--></span>
208                    <!--{/if}-->
209                    <input type="checkbox" name="<!--{$key}-->[<!--{$index}-->]" value="1" <!--{if $arrForm[$key].value[$index] == "1"}-->checked="checked"<!--{/if}--> onClick="fnCheckStockNoLimit('<!--{$index}-->','<!--{$smarty.const.DISABLED_RGB}-->');" id="<!--{$key}-->_<!--{$index}-->" /><label for="<!--{$key}-->_<!--{$index}-->">無制限</label>
210                </td>
211                <td class="center">
212                    <!--{assign var=key value="price01"}-->
213                    <!--{if $arrErr[$key][$index]}-->
214                        <span class="attention"><!--{$arrErr[$key][$index]}--></span>
215                    <!--{/if}-->
216                    <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" <!--{if $arrErr[$key][$index] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />
217                </td>
218                <td class="center">
219                    <!--{assign var=key value="price02"}-->
220                    <!--{if $arrErr[$key][$index]}-->
221                        <span class="attention"><!--{$arrErr[$key][$index]}--></span>
222                    <!--{/if}-->
223                    <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" <!--{if $arrErr[$key][$index] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />
224                </td>
225                <td class="class-product-type">
226                    <!--{assign var=key value="product_type_id"}-->
227                    <!--{if $arrErr[$key][$index]}-->
228                        <span class="attention"><!--{$arrErr[$key][$index]}--></span>
229                    <!--{/if}-->
230                    <!--{html_radios name="`$key`[`$index`]" options=$arrProductType selected=$arrForm[$key].value[$index]|h separator='<br />'}-->
231                </td>
232                <td class="center">
233                    <!--{assign var=key value="down_filename}-->
234                    <!--{if $arrErr[$key][$index]}-->
235                        <span class="attention"><!--{$arrErr[$key][$index]}--></span>
236                    <!--{/if}-->
237                    <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{if $arrErr[$key][$index] != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}--><!--{/if}-->" size="10" />
238                </td>
239                <td>
240                    <!--{assign var=key value="down_realfilename"}-->
241                    <!--{if $arrErr[$key][$index]}-->
242                        <span class="attention"><!--{$arrErr[$key][$index]}--></span>
243                    <!--{/if}-->
244                    <!--{if $arrForm[$key].value[$index] != ""}-->
245                        <!--{$arrForm[$key].value[$index]|h}--><br />
246                        <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
247                        <a href="?" onclick="fnFormModeSubmit('form1', 'file_delete', 'upload_index', '<!--{$index}-->'); return false;">[ファイルの取り消し]</a>
248                    <!--{else}-->
249                    <input type="file" name="<!--{$key}-->[<!--{$index}-->]" size="10" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" /><br />
250                    <a class="btn-normal" href="javascript:;" name="btn" onclick="fnFormModeSubmit('form1', 'file_upload', 'upload_index', '<!--{$index}-->'); return false;">アップロード</a>
251                    <!--{/if}-->
252                </td>
253            </tr>
254        <!--{/section}-->
255    </table>
256
257    <div class="btn-area">
258        <ul>
259            <li><a class="btn-action" href="javascript:;" onclick="fnFormModeSubmit('form1', 'edit', '', ''); return false;"><span class="btn-next">確認ページへ</span></a></li>
260        </ul>
261    </div>
262
263    <!--{/if}-->
264
265</div>
266</form>
Note: See TracBrowser for help on using the repository browser.