1 | <!--{* |
---|
2 | /* |
---|
3 | * This file is part of EC-CUBE |
---|
4 | * |
---|
5 | * Copyright(c) 2000-2014 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 | |
---|
25 | <script type="text/javascript">//<![CDATA[ |
---|
26 | $(function() { |
---|
27 | // 無制限チェックボックスの初期化 |
---|
28 | $('input[id^=chk_stock_unlimited_]').each(function() { |
---|
29 | var index = $(this).attr('id').replace(/^chk_stock_unlimited_/ig, ''); |
---|
30 | var checked = $(this).attr('checked'); |
---|
31 | |
---|
32 | if (checked) { |
---|
33 | $('#stock_' + index) |
---|
34 | .attr('readonly', true) |
---|
35 | .css('background-color', '<!--{$smarty.const.DISABLED_RGB}-->'); |
---|
36 | } |
---|
37 | }); |
---|
38 | |
---|
39 | // 無制限チェックボックス |
---|
40 | $('input[id^=chk_stock_unlimited_]').change(function() { |
---|
41 | var index = $(this).attr('id').replace(/^chk_stock_unlimited_/ig, ''); |
---|
42 | var checked = $(this).attr('checked'); |
---|
43 | |
---|
44 | if (checked) { |
---|
45 | $('#stock_' + index) |
---|
46 | .attr('readonly', true) |
---|
47 | .css('background-color', '<!--{$smarty.const.DISABLED_RGB}-->'); |
---|
48 | } else { |
---|
49 | $('#stock_' + index) |
---|
50 | .attr('readonly', false) |
---|
51 | .css('background-color', ''); |
---|
52 | } |
---|
53 | }); |
---|
54 | |
---|
55 | // 1行目をコピーボタン |
---|
56 | $('#copy_from_first').click(function() { |
---|
57 | var check = $('#check_0').attr('checked'); |
---|
58 | $('input[id^=check_]').attr('checked', check); |
---|
59 | |
---|
60 | var product_code = $('#product_code_0').val(); |
---|
61 | $('input[id^=product_code_]').val(product_code); |
---|
62 | |
---|
63 | var stock = $('#stock_0').val(); |
---|
64 | $('input[id^=stock_]').val(stock); |
---|
65 | |
---|
66 | var stock_unlimited = $('#chk_stock_unlimited_0').attr('checked'); |
---|
67 | $('input[id^=chk_stock_unlimited_]').each(function() { |
---|
68 | var checked = stock_unlimited; |
---|
69 | var index = $(this).attr('id').replace(/^chk_stock_unlimited_/ig, ''); |
---|
70 | $(this).attr('checked', checked); |
---|
71 | if (checked) { |
---|
72 | $('#stock_' + index) |
---|
73 | .attr('readonly', true) |
---|
74 | .css('background-color', '<!--{$smarty.const.DISABLED_RGB}-->'); |
---|
75 | } else { |
---|
76 | $('#stock_' + index) |
---|
77 | .attr('readonly', false) |
---|
78 | .css('background-color', ''); |
---|
79 | } |
---|
80 | }); |
---|
81 | |
---|
82 | var price01 = $('#price01_0').val(); |
---|
83 | $('input[id^=price01_]').val(price01); |
---|
84 | |
---|
85 | var price02 = $('#price02_0').val(); |
---|
86 | $('input[id^=price02_]').val(price02); |
---|
87 | |
---|
88 | var tax_rate = $('#tax_rate_0').val(); |
---|
89 | $('input[id^=tax_rate_]').val(tax_rate); |
---|
90 | |
---|
91 | var product_type_id_value = ''; |
---|
92 | $('input[id^=product_type_id_0_]').each(function() { |
---|
93 | if ($(this).attr('checked')) { |
---|
94 | product_type_id_value = $(this).val(); |
---|
95 | } |
---|
96 | }); |
---|
97 | $('input[id^=product_type_id_]').each(function() { |
---|
98 | if ($(this).val() == product_type_id_value) { |
---|
99 | $(this).attr('checked', true); |
---|
100 | } |
---|
101 | }); |
---|
102 | |
---|
103 | var down_filename = $('#down_filename_0').val(); |
---|
104 | $('input[id^=down_filename_]').val(down_filename); |
---|
105 | }); |
---|
106 | }); |
---|
107 | //]]></script> |
---|
108 | <h2>商品規格登録</h2> |
---|
109 | <form name="form1" id="form1" method="post" action="" enctype="multipart/form-data"> |
---|
110 | <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> |
---|
111 | <!--{foreach key=key item=item from=$arrSearchHidden}--> |
---|
112 | <!--{if is_array($item)}--> |
---|
113 | <!--{foreach item=c_item from=$item}--> |
---|
114 | <input type="hidden" name="<!--{$key|h}-->[]" value="<!--{$c_item|h}-->" /> |
---|
115 | <!--{/foreach}--> |
---|
116 | <!--{else}--> |
---|
117 | <input type="hidden" name="<!--{$key|h}-->" value="<!--{$item|h}-->" /> |
---|
118 | <!--{/if}--> |
---|
119 | <!--{/foreach}--> |
---|
120 | <input type="hidden" name="mode" value="edit" /> |
---|
121 | <input type="hidden" name="product_id" value="<!--{$arrForm.product_id.value|h}-->" /> |
---|
122 | <input type="hidden" name="upload_index" value=""> |
---|
123 | <input type="hidden" name="total" value="<!--{$arrForm.total.value|h}-->" /> |
---|
124 | |
---|
125 | <div id="products" class="contents-main"> |
---|
126 | |
---|
127 | <table> |
---|
128 | <tr> |
---|
129 | <th>商品名</th> |
---|
130 | <td><!--{$arrForm.product_name.value|h}--></td> |
---|
131 | </tr> |
---|
132 | <tr> |
---|
133 | <th>規格1<span class="attention">*</span></th> |
---|
134 | <td> |
---|
135 | <!--{assign var=key value="class_id1"}--> |
---|
136 | <!--{if $arrErr[$key]}--> |
---|
137 | <span class="attention"><!--{$arrErr[$key]}--></span> |
---|
138 | <!--{/if}--> |
---|
139 | |
---|
140 | <select name="<!--{$key}-->"> |
---|
141 | <option value="">選択してください</option> |
---|
142 | <!--{html_options options=$arrClass selected=$arrForm[$key].value}--> |
---|
143 | </select> |
---|
144 | </td> |
---|
145 | </tr> |
---|
146 | <tr> |
---|
147 | <th>規格2</th> |
---|
148 | <td> |
---|
149 | <!--{assign var=key value="class_id2"}--> |
---|
150 | <!--{if $arrErr[$key]}--> |
---|
151 | <span class="attention"><!--{$arrErr[$key]}--></span> |
---|
152 | <!--{/if}--> |
---|
153 | <select name="<!--{$key}-->"> |
---|
154 | <option value="">選択してください</option> |
---|
155 | <!--{html_options options=$arrClass selected=$arrForm[$key].value}--> |
---|
156 | </select> |
---|
157 | </td> |
---|
158 | </tr> |
---|
159 | </table> |
---|
160 | <div class="btn-area"> |
---|
161 | <ul> |
---|
162 | <li><a class="btn-action" href="javascript:;" onclick="eccube.changeAction('<!--{$smarty.const.ADMIN_PRODUCTS_URLPATH}-->'); eccube.setModeAndSubmit('search','',''); return false;" ><span class="btn-prev">検索結果へ戻る</span></a></li> |
---|
163 | <li><a class="btn-action" href="javascript:;" onclick="eccube.setModeAndSubmit('disp','',''); return false;"><span class="btn-next">表示する</span></a></li> |
---|
164 | <!--{if $arrForm.total.value > 0}--> |
---|
165 | <li><a class="btn-action" href="javascript:;" onclick="eccube.setModeAndSubmit('delete','',''); return false;"><span class="btn-next">削除する</span></a></li> |
---|
166 | <!--{/if}--> |
---|
167 | </ul> |
---|
168 | </div> |
---|
169 | |
---|
170 | <!--{if $arrForm.total.value > 0}--> |
---|
171 | |
---|
172 | <!--{foreach item=item name=i from=$arrClassCat}--> |
---|
173 | <!--{if $smarty.foreach.i.first}--> |
---|
174 | <!--{assign var=cnt value=$smarty.foreach.i.total}--> |
---|
175 | <!--{/if}--> |
---|
176 | <!--{/foreach}--> |
---|
177 | |
---|
178 | <div class="list-info clearfix"> |
---|
179 | <div class="btn"><a class="btn-normal" href="javascript:;" id="copy_from_first"><span>一行目のデータをコピーする</span></a></div> |
---|
180 | <p><span class="bold">アップロード可能な拡張子:</span><!--{$smarty.const.DOWNLOAD_EXTENSION}-->(パラメーター DOWNLOAD_EXTENSION)</p> |
---|
181 | </div> |
---|
182 | |
---|
183 | <!--{if $arrErr.check_empty}--> |
---|
184 | <span class="attention"><!--{$arrErr.check_empty}--></span> |
---|
185 | <!--{/if}--> |
---|
186 | |
---|
187 | <table class="list"> |
---|
188 | <col width="5%" /> |
---|
189 | <col width="15%" /> |
---|
190 | <col width="15%" /> |
---|
191 | <col width="9%" /> |
---|
192 | <col width="10%" /> |
---|
193 | <col width="10%" /> |
---|
194 | <col width="10%" /> |
---|
195 | <col width="10%" /> |
---|
196 | <col width="8%" /> |
---|
197 | <col width="8%" /> |
---|
198 | <tr> |
---|
199 | <th><input type="checkbox" onclick="eccube.checkAllBox(this, 'input[name^=check]')" id="allCheck" /> <label for="allCheck"><br />登録</label></th> |
---|
200 | <th>規格1<br />(<!--{$arrClass[$class_id1]|default:"未選択"|h}-->)</th> |
---|
201 | <th>規格2<br />(<!--{$arrClass[$class_id2]|default:"未選択"|h}-->)</th> |
---|
202 | <th>商品コード</th> |
---|
203 | <th>在庫数<span class="attention">*</span></th> |
---|
204 | <th><!--{$smarty.const.NORMAL_PRICE_TITLE}-->(円)</th> |
---|
205 | <th><!--{$smarty.const.SALE_PRICE_TITLE}-->(円)<span class="attention">*</span></th> |
---|
206 | <!--{if $smarty.const.OPTION_PRODUCT_TAX_RULE}--> |
---|
207 | <th>消費税率(%)<span class="attention">*</span></th> |
---|
208 | <!--{/if}--> |
---|
209 | <th>商品種別<span class="attention">*</span></th> |
---|
210 | <th>ダウンロード<br />ファイル名<span class="red"><br />上限<!--{$smarty.const.STEXT_LEN}-->文字</span></th> |
---|
211 | <th>ダウンロード商品用<br />ファイル</th> |
---|
212 | </tr> |
---|
213 | <!--{section name=cnt loop=$arrForm.total.value}--> |
---|
214 | <!--{assign var=index value=$smarty.section.cnt.index}--> |
---|
215 | |
---|
216 | <tr> |
---|
217 | <td class="center"> |
---|
218 | <!--{assign var=key value="classcategory_id1"}--> |
---|
219 | <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" /> |
---|
220 | <!--{assign var=key value="classcategory_id2"}--> |
---|
221 | <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" /> |
---|
222 | <!--{assign var=key value="product_class_id"}--> |
---|
223 | <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" /> |
---|
224 | <!--{assign var=key value="check"}--> |
---|
225 | <!--{if $arrErr[$key][$index]}--> |
---|
226 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
227 | <!--{/if}--> |
---|
228 | <input type="checkbox" name="<!--{$key}-->[<!--{$index}-->]" value="1" <!--{if $arrForm[$key].value[$index] == 1}-->checked="checked"<!--{/if}--> id="<!--{$key}-->_<!--{$index}-->" /> |
---|
229 | </td> |
---|
230 | <td class="center"> |
---|
231 | <!--{assign var=key value="classcategory_name1"}--> |
---|
232 | <!--{if $arrErr[$key][$index]}--> |
---|
233 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
234 | <!--{/if}--> |
---|
235 | <!--{$arrForm[$key].value[$index]|h}--> |
---|
236 | <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" /> |
---|
237 | </td> |
---|
238 | <td class="center"> |
---|
239 | <!--{assign var=key value="classcategory_name2"}--> |
---|
240 | <!--{if $arrErr[$key][$index]}--> |
---|
241 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
242 | <!--{/if}--> |
---|
243 | <!--{$arrForm[$key].value[$index]|h}--> |
---|
244 | <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" /> |
---|
245 | </td> |
---|
246 | <td class="center"> |
---|
247 | <!--{assign var=key value="product_code"}--> |
---|
248 | <!--{if $arrErr[$key][$index]}--> |
---|
249 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
250 | <!--{/if}--> |
---|
251 | <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}-->" /> |
---|
252 | </td> |
---|
253 | <td class="center"> |
---|
254 | <!--{assign var=key value="stock"}--> |
---|
255 | <!--{if $arrErr[$key][$index]}--> |
---|
256 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
257 | <!--{/if}--> |
---|
258 | <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}-->" /> |
---|
259 | <!--{assign var=key value="stock_unlimited"}--><br /> |
---|
260 | <!--{if $arrErr[$key][$index]}--> |
---|
261 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
262 | <!--{/if}--> |
---|
263 | <input type="checkbox" name="<!--{$key}-->[<!--{$index}-->]" value="1" <!--{if $arrForm[$key].value[$index] == "1"}-->checked="checked"<!--{/if}--> id="chk_<!--{$key}-->_<!--{$index}-->" /><label for="chk_<!--{$key}-->_<!--{$index}-->">無制限</label> |
---|
264 | </td> |
---|
265 | <td class="center"> |
---|
266 | <!--{assign var=key value="price01"}--> |
---|
267 | <!--{if $arrErr[$key][$index]}--> |
---|
268 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
269 | <!--{/if}--> |
---|
270 | <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}-->" /> |
---|
271 | </td> |
---|
272 | <td class="center"> |
---|
273 | <!--{assign var=key value="price02"}--> |
---|
274 | <!--{if $arrErr[$key][$index]}--> |
---|
275 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
276 | <!--{/if}--> |
---|
277 | <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}-->" /> |
---|
278 | </td> |
---|
279 | <!--{if $smarty.const.OPTION_PRODUCT_TAX_RULE}--> |
---|
280 | <td class="center"> |
---|
281 | <!--{assign var=key value="tax_rate"}--> |
---|
282 | <!--{if $arrErr[$key][$index]}--> |
---|
283 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
284 | <!--{/if}--> |
---|
285 | <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}-->" /> |
---|
286 | </td> |
---|
287 | <!--{/if}--> |
---|
288 | <td class="class-product-type"> |
---|
289 | <!--{assign var=key value="product_type_id"}--> |
---|
290 | <!--{if $arrErr[$key][$index]}--> |
---|
291 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
292 | <!--{/if}--> |
---|
293 | <!--{foreach from=$arrProductType key=productTypeKey item=productType name=productType}--> |
---|
294 | <input type="radio" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$productTypeKey}-->" <!--{if $arrForm[$key].value[$index] == $productTypeKey}-->checked="checked"<!--{/if}--> <!--{if $arrErr[$key][$index] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> id="<!--{$key}-->_<!--{$index}-->_<!--{$smarty.foreach.productType.index}-->"><label for="<!--{$key}-->_<!--{$index}-->_<!--{$smarty.foreach.productType.index}-->"<!--{if $arrErr[$key][$index] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> ><!--{$productType}--></label><!--{if !$smarty.foreach.productType.last}--><br /><!--{/if}--> |
---|
295 | <!--{/foreach}--> |
---|
296 | </td> |
---|
297 | <td class="center"> |
---|
298 | <!--{assign var=key value="down_filename}--> |
---|
299 | <!--{if $arrErr[$key][$index]}--> |
---|
300 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
301 | <!--{/if}--> |
---|
302 | <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" id="<!--{$key}-->_<!--{$index}-->" /> |
---|
303 | </td> |
---|
304 | <td> |
---|
305 | <!--{assign var=key value="down_realfilename"}--> |
---|
306 | <!--{if $arrErr[$key][$index]}--> |
---|
307 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
308 | <!--{/if}--> |
---|
309 | <!--{if $arrForm[$key].value[$index] != ""}--> |
---|
310 | <!--{$arrForm[$key].value[$index]|h}--><br /> |
---|
311 | <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" /> |
---|
312 | <a href="?" onclick="eccube.fnFormModeSubmit('form1', 'file_delete', 'upload_index', '<!--{$index}-->'); return false;">[ファイルの取り消し]</a> |
---|
313 | <!--{else}--> |
---|
314 | <input type="file" name="<!--{$key}-->[<!--{$index}-->]" size="10" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" /><br /> |
---|
315 | <a class="btn-normal" href="javascript:;" name="btn" onclick="eccube.fnFormModeSubmit('form1', 'file_upload', 'upload_index', '<!--{$index}-->'); return false;">アップロード</a> |
---|
316 | <!--{/if}--> |
---|
317 | </td> |
---|
318 | </tr> |
---|
319 | <!--{/section}--> |
---|
320 | </table> |
---|
321 | |
---|
322 | <div class="btn-area"> |
---|
323 | <ul> |
---|
324 | <li><a class="btn-action" href="javascript:;" onclick="eccube.fnFormModeSubmit('form1', 'edit', '', ''); return false;"><span class="btn-next">確認ページへ</span></a></li> |
---|
325 | </ul> |
---|
326 | </div> |
---|
327 | |
---|
328 | <!--{/if}--> |
---|
329 | |
---|
330 | </div> |
---|
331 | </form> |
---|