source: branches/version-2_13_0/data/Smarty/templates/admin/products/product_class.tpl @ 23103

Revision 23103, 18.2 KB checked in by h_yoshimoto, 11 years ago (diff)

#2342 一旦戻した内容を再度適用

  • 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
Line 
1<!--{*
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2013 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 product_type_id_value = '';
89            $('input[id^=product_type_id_0_]').each(function() {
90                if ($(this).attr('checked')) {
91                    product_type_id_value = $(this).val();
92                }
93            });
94            $('input[id^=product_type_id_]').each(function() {
95                if ($(this).val() == product_type_id_value) {
96                    $(this).attr('checked', true);
97                }
98            });
99
100            var down_filename = $('#down_filename_0').val();
101            $('input[id^=down_filename_]').val(down_filename);
102        });
103    });
104//]]></script>
105<h2>商品規格登録</h2>
106<form name="form1" id="form1" method="post" action="" enctype="multipart/form-data">
107    <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
108    <!--{foreach key=key item=item from=$arrSearchHidden}-->
109        <!--{if is_array($item)}-->
110            <!--{foreach item=c_item from=$item}-->
111            <input type="hidden" name="<!--{$key|h}-->[]" value="<!--{$c_item|h}-->" />
112            <!--{/foreach}-->
113        <!--{else}-->
114            <input type="hidden" name="<!--{$key|h}-->" value="<!--{$item|h}-->" />
115        <!--{/if}-->
116    <!--{/foreach}-->
117    <input type="hidden" name="mode" value="edit" />
118    <input type="hidden" name="product_id" value="<!--{$arrForm.product_id.value|h}-->" />
119    <input type="hidden" name="upload_index" value="">
120    <input type="hidden" name="total" value="<!--{$arrForm.total.value|h}-->" />
121
122    <div id="products" class="contents-main">
123
124        <table>
125            <tr>
126                <th>商品名</th>
127                <td><!--{$arrForm.product_name.value|h}--></td>
128            </tr>
129            <tr>
130                <th>規格1<span class="attention">*</span></th>
131                <td>
132                    <!--{assign var=key value="class_id1"}-->
133                    <!--{if $arrErr[$key]}-->
134                    <span class="attention"><!--{$arrErr[$key]}--></span>
135                    <!--{/if}-->
136
137                    <select name="<!--{$key}-->">
138                        <option value="">選択してください</option>
139                        <!--{html_options options=$arrClass selected=$arrForm[$key].value}-->
140                    </select>
141                </td>
142            </tr>
143            <tr>
144                <th>規格2</th>
145                <td>
146                    <!--{assign var=key value="class_id2"}-->
147                    <!--{if $arrErr[$key]}-->
148                    <span class="attention"><!--{$arrErr[$key]}--></span>
149                    <!--{/if}-->
150                    <select name="<!--{$key}-->">
151                        <option value="">選択してください</option>
152                        <!--{html_options options=$arrClass selected=$arrForm[$key].value}-->
153                    </select>
154                </td>
155            </tr>
156        </table>
157        <div class="btn-area">
158            <ul>
159                <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>
160                <li><a class="btn-action" href="javascript:;" onclick="eccube.setModeAndSubmit('disp','',''); return false;"><span class="btn-next">表示する</span></a></li>
161            <!--{if $arrForm.total.value > 0}-->
162                <li><a class="btn-action" href="javascript:;" onclick="eccube.setModeAndSubmit('delete','',''); return false;"><span class="btn-next">削除する</span></a></li>
163            <!--{/if}-->
164            </ul>
165        </div>
166
167        <!--{if $arrForm.total.value > 0}-->
168
169        <!--{foreach item=item name=i from=$arrClassCat}-->
170            <!--{if $smarty.foreach.i.first}-->
171                <!--{assign var=cnt value=$smarty.foreach.i.total}-->
172            <!--{/if}-->
173        <!--{/foreach}-->
174
175        <div class="list-info clearfix">
176            <div class="btn"><a class="btn-normal" href="javascript:;" id="copy_from_first"><span>一行目のデータをコピーする</span></a></div>
177            <p><span class="bold">アップロード可能な拡張子:</span><!--{$smarty.const.DOWNLOAD_EXTENSION}-->(パラメーター DOWNLOAD_EXTENSION)</p>
178        </div>
179
180        <!--{if $arrErr.check_empty}-->
181            <span class="attention"><!--{$arrErr.check_empty}--></span>
182        <!--{/if}-->
183
184        <table class="list">
185            <col width="5%" />
186            <col width="15%" />
187            <col width="15%" />
188            <col width="9%" />
189            <col width="10%" />
190            <col width="10%" />
191            <col width="10%" />
192            <col width="10%" />
193            <col width="8%" />
194            <col width="8%" />
195            <tr>
196                <th><input type="checkbox" onclick="fnAllCheck(this, 'input[name^=check]')" id="allCheck" /> <label for="allCheck"><br />登録</label></th>
197                <th>規格1<br />(<!--{$arrClass[$class_id1]|default:"未選択"|h}-->)</th>
198                <th>規格2<br />(<!--{$arrClass[$class_id2]|default:"未選択"|h}-->)</th>
199                <th>商品コード</th>
200                <th>在庫数<span class="attention">*</span></th>
201                <th><!--{$smarty.const.NORMAL_PRICE_TITLE}-->(円)</th>
202                <th><!--{$smarty.const.SALE_PRICE_TITLE}-->(円)<span class="attention">*</span></th>
203                <th>消費税率(%)<span class="attention">*</span></th>
204                <th>商品種別<span class="attention">*</span></th>
205                <th>ダウンロード<br />ファイル名<span class="red"><br />上限<!--{$smarty.const.STEXT_LEN}-->文字</span></th>
206                <th>ダウンロード商品用<br />ファイル</th>
207            </tr>
208            <!--{section name=cnt loop=$arrForm.total.value}-->
209                <!--{assign var=index value=$smarty.section.cnt.index}-->
210
211                <tr>
212                    <td class="center">
213                        <!--{assign var=key value="classcategory_id1"}-->
214                        <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
215                        <!--{assign var=key value="classcategory_id2"}-->
216                        <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
217                        <!--{assign var=key value="product_class_id"}-->
218                        <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
219                        <!--{assign var=key value="check"}-->
220                        <!--{if $arrErr[$key][$index]}-->
221                            <span class="attention"><!--{$arrErr[$key][$index]}--></span>
222                        <!--{/if}-->
223                        <input type="checkbox" name="<!--{$key}-->[<!--{$index}-->]" value="1" <!--{if $arrForm[$key].value[$index] == 1}-->checked="checked"<!--{/if}--> id="<!--{$key}-->_<!--{$index}-->" />
224                    </td>
225                    <td class="center">
226                        <!--{assign var=key value="classcategory_name1"}-->
227                        <!--{if $arrErr[$key][$index]}-->
228                            <span class="attention"><!--{$arrErr[$key][$index]}--></span>
229                        <!--{/if}-->
230                        <!--{$arrForm[$key].value[$index]|h}-->
231                        <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
232                    </td>
233                    <td class="center">
234                        <!--{assign var=key value="classcategory_name2"}-->
235                        <!--{if $arrErr[$key][$index]}-->
236                            <span class="attention"><!--{$arrErr[$key][$index]}--></span>
237                        <!--{/if}-->
238                        <!--{$arrForm[$key].value[$index]|h}-->
239                        <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
240                    </td>
241                    <td class="center">
242                        <!--{assign var=key value="product_code"}-->
243                        <!--{if $arrErr[$key][$index]}-->
244                            <span class="attention"><!--{$arrErr[$key][$index]}--></span>
245                        <!--{/if}-->
246                        <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}-->" />
247                    </td>
248                    <td class="center">
249                        <!--{assign var=key value="stock"}-->
250                        <!--{if $arrErr[$key][$index]}-->
251                            <span class="attention"><!--{$arrErr[$key][$index]}--></span>
252                        <!--{/if}-->
253                        <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}-->" />
254                        <!--{assign var=key value="stock_unlimited"}--><br />
255                        <!--{if $arrErr[$key][$index]}-->
256                            <span class="attention"><!--{$arrErr[$key][$index]}--></span>
257                        <!--{/if}-->
258                        <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>
259                    </td>
260                    <td class="center">
261                        <!--{assign var=key value="price01"}-->
262                        <!--{if $arrErr[$key][$index]}-->
263                            <span class="attention"><!--{$arrErr[$key][$index]}--></span>
264                        <!--{/if}-->
265                        <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}-->" />
266                    </td>
267                    <td class="center">
268                        <!--{assign var=key value="price02"}-->
269                        <!--{if $arrErr[$key][$index]}-->
270                            <span class="attention"><!--{$arrErr[$key][$index]}--></span>
271                        <!--{/if}-->
272                        <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}-->" />
273                    </td>
274                    <td class="center">
275                        <!--{assign var=key value="tax_rate"}-->
276                        <!--{if $arrErr[$key][$index]}-->
277                            <span class="attention"><!--{$arrErr[$key][$index]}--></span>
278                        <!--{/if}-->
279                        <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}-->" />
280                    </td>
281                    <td class="class-product-type">
282                        <!--{assign var=key value="product_type_id"}-->
283                        <!--{if $arrErr[$key][$index]}-->
284                            <span class="attention"><!--{$arrErr[$key][$index]}--></span>
285                        <!--{/if}-->
286                        <!--{foreach from=$arrProductType key=productTypeKey item=productType name=productType}-->
287                            <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}-->
288                        <!--{/foreach}-->
289                    </td>
290                    <td class="center">
291                        <!--{assign var=key value="down_filename}-->
292                        <!--{if $arrErr[$key][$index]}-->
293                            <span class="attention"><!--{$arrErr[$key][$index]}--></span>
294                        <!--{/if}-->
295                        <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}-->" />
296                    </td>
297                    <td>
298                        <!--{assign var=key value="down_realfilename"}-->
299                        <!--{if $arrErr[$key][$index]}-->
300                            <span class="attention"><!--{$arrErr[$key][$index]}--></span>
301                        <!--{/if}-->
302                        <!--{if $arrForm[$key].value[$index] != ""}-->
303                            <!--{$arrForm[$key].value[$index]|h}--><br />
304                            <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
305                            <a href="?" onclick="eccube.fnFormModeSubmit('form1', 'file_delete', 'upload_index', '<!--{$index}-->'); return false;">[ファイルの取り消し]</a>
306                        <!--{else}-->
307                        <input type="file" name="<!--{$key}-->[<!--{$index}-->]" size="10" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" /><br />
308                        <a class="btn-normal" href="javascript:;" name="btn" onclick="eccube.fnFormModeSubmit('form1', 'file_upload', 'upload_index', '<!--{$index}-->'); return false;">アップロード</a>
309                        <!--{/if}-->
310                    </td>
311                </tr>
312            <!--{/section}-->
313        </table>
314
315        <div class="btn-area">
316            <ul>
317                <li><a class="btn-action" href="javascript:;" onclick="eccube.fnFormModeSubmit('form1', 'edit', '', ''); return false;"><span class="btn-next">確認ページへ</span></a></li>
318            </ul>
319        </div>
320
321        <!--{/if}-->
322
323    </div>
324</form>
Note: See TracBrowser for help on using the repository browser.