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

Revision 20609, 12.8 KB checked in by kotani, 13 years ago (diff)

#1017 ([管理画面]チェックボックスの値の引き継ぎができていない)

  • 商品規格登録対応
  • 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-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="down_key" value="">
69<!--{* foreach key=name item=item from=$arrHidden *}-->
70<input type="hidden" name="<!--{$name}-->" value="<!--{$item|h}-->" />
71<!--{* /foreach *}-->
72<div id="products" class="contents-main">
73
74    <table>
75        <tr>
76            <th>商品名</th>
77            <td><!--{$arrForm.product_name.value|h}--></td>
78        </tr>
79        <tr>
80            <th>規格1<span class="attention">*</span></th>
81            <td>
82                <!--{assign var=key value="select_class_id1"}-->
83                <!--{if $arrErr[$key]}-->
84                <span class="attention"><!--{$arrErr[$key]}--></span>
85                <!--{/if}-->
86
87                <select name="<!--{$key}-->">
88                    <option value="">選択してください</option>
89                    <!--{html_options options=$arrClass selected=$arrForm[$key].value}-->
90                </select>
91            </td>
92        </tr>
93        <tr>
94            <th>規格2</th>
95            <td>
96                <!--{assign var=key value="select_class_id2"}-->
97                <!--{if $arrErr[$key]}-->
98                <span class="attention"><!--{$arrErr[$key]}--></span>
99                <!--{/if}-->
100                <select name="<!--{$key}-->">
101                    <option value="">選択してください</option>
102                    <!--{html_options options=$arrClass selected=$arrForm[$key].value}-->
103                </select>
104            </td>
105        </tr>
106    </table>
107    <div class="btn-area">
108        <ul>
109            <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>
110            <li><a class="btn-action" href="javascript:;" onclick="fnModeSubmit('disp','',''); return false;"><span class="btn-next">表示する</span></a></li>
111        <!--{if $arrForm.total.value > 0}-->
112            <li><a class="btn-action" href="javascript:;" onclick="fnModeSubmit('delete','',''); return false;"><span class="btn-next">削除する</span></a></li>
113        <!--{/if}-->
114        </ul>
115    </div>
116
117    <!--{if $arrForm.total.value > 0}-->
118
119    <!--{foreach item=item name=i from=$arrClassCat}-->
120        <!--{if $smarty.foreach.i.first}-->
121            <!--{assign var=cnt value=$smarty.foreach.i.total}-->
122        <!--{/if}-->
123    <!--{/foreach}-->
124
125    <div class="list-info clearfix">
126        <div class="btn"><a class="btn-normal" href="javascript:;" onclick="fnCopyValue('<!--{$cnt}-->', '<!--{$smarty.const.DISABLED_RGB}-->'); return false;"><span>一行目のデータをコピーする</span></a></div>
127        <p><span class="bold">アップロード可能な拡張子:</span><!--{$smarty.const.DOWNLOAD_EXTENSION}-->(パラメータ DOWNLOAD_EXTENSION)</p>
128    </div>
129
130    <!--{assign var=key1 value="class_id1"}-->
131    <!--{assign var=key2 value="class_id2"}-->
132    <!--{assign var=class_id1 value=$arrForm[$key1].value|h}-->
133    <!--{assign var=class_id2 value=$arrForm[$key2].value|h}-->
134    <input type="hidden" name="<!--{$key1}-->" value="<!--{$class_id1}-->" />
135    <input type="hidden" name="<!--{$key2}-->" value="<!--{$class_id2}-->" />
136    <table class="list" width="900">
137        <colgroup width="5%">
138        <colgroup width="9%">
139        <colgroup width="9%">
140        <colgroup width="9%">
141        <colgroup width="10%">
142        <colgroup width="10%">
143        <colgroup width="10%">
144        <colgroup width="10%">
145        <colgroup width="8%">
146        <colgroup width="8%">
147        <colgroup width="8%">
148        <tr>
149            <th><input type="checkbox" onclick="fnAllCheck(this, 'input[name^=check]')" id="allCheck" /> <label for="allCheck"><br>登録</label></th>
150            <th>規格1<br>(<!--{$arrClass[$class_id1]|default:"未選択"|h}-->)</th>
151            <th>規格2<br>(<!--{$arrClass[$class_id2]|default:"未選択"|h}-->)</th>
152            <th>商品コード</th>
153            <th>在庫数<span class="attention">*</span></th>
154            <th><!--{$smarty.const.NORMAL_PRICE_TITLE}-->(円)</th>
155            <th><!--{$smarty.const.SALE_PRICE_TITLE}-->(円)<span class="attention">*</span></th>
156            <th>商品種別<span class="attention">*</span></th>
157            <th>ダウンロード<br>ファイル名<span class="red"><br>上限<!--{$smarty.const.STEXT_LEN}-->文字</span></th>
158            <th>ダウンロード商品用<br>ファイル</th>
159        </tr>
160        <!--{section name=cnt loop=$arrForm.total.value}-->
161            <!--{assign var=index value=$smarty.section.cnt.index}-->
162
163            <!--{* TODO *}-->
164            <!--{assign var=key value="error:`$smarty.section.cnt.iteration`"}-->
165            <!--{if $arrErr[$key] != ""}-->
166            <tr>
167                <td colspan="10"><span class="attention"><!--{$arrErr[$key]}--></span></td>
168            </tr>
169            <!--{/if}-->
170            <tr >
171
172                <td class="center" >
173                    <!--{assign var=key value="classcategory_id1"}-->
174                    <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
175                    <!--{assign var=key value="classcategory_id2"}-->
176                    <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
177                    <!--{assign var=key value="product_class_id"}-->
178                    <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
179                    <!--{assign var=key value="check"}-->
180                    <input type="checkbox" name="<!--{$key}-->[<!--{$index}-->]" value="1" <!--{if $arrForm[$key].value[$index] == 1}-->checked="checked"<!--{/if}--> />
181                </td>
182                <td class="center">
183                    <!--{assign var=key value="classcategory_name1"}-->
184                    <!--{$arrForm[$key].value[$index]|h}-->
185                    <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
186                </td>
187                <td class="center">
188                    <!--{assign var=key value="classcategory_name2"}-->
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                    <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" <!--{if $arrErr[$key] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />
195                </td>
196                <td class="center">
197                    <!--{assign var=key value="stock"}-->
198                    <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" <!--{if $arrErr[$key] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> id="<!--{$key}-->_<!--{$index}-->" />
199                    <!--{assign var=key value="stock_unlimited"}--><br />
200                    <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>
201                </td>
202                <td class="center">
203                    <!--{assign var=key value="price01"}-->
204                    <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" <!--{if $arrErr[$key] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />
205                </td>
206                <td class="center">
207                    <!--{assign var=key value="price02"}-->
208                    <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" <!--{if $arrErr[$key] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />
209                </td>
210                <td class="class-product-type">
211                    <!--{assign var=key value="product_type_id"}-->
212                    <!--{html_radios name="`$key`[`$index`]" options=$arrProductType selected=$arrForm[$key].value[$index]|h separator='<br />'}-->
213                </td>
214                <td class="center">
215                    <!--{assign var=key value="down_filename}-->
216                    <span class="attention"><!--{$arrErr[$key]}--></span>
217                    <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{if $arrErr[$key] != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}--><!--{/if}-->" size="10" />
218                </td>
219                <td>
220                    <!--{assign var=key value="down_realfilename"}-->
221                    <span class="attention"><!--{$arrErr[$key]}--></span>
222                    <!--{if $arrForm[$key].value[$index] != ""}-->
223                        <!--{$arrForm[$key].value[$index]|h}-->
224                        <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" />
225                        <a href="?" onclick="fnFormModeSubmit('form1', 'delete_down', 'down_key[<!--{$index}-->]', '<!--{$key}-->'); return false;">[ファイルの取り消し]</a><br />
226                    <!--{/if}-->
227                    <input type="file" name="<!--{$key}-->[<!--{$index}-->]" size="10" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" /><br />
228                    <a class="btn-normal" href="javascript:;" name="btn" onclick="fnFormModeSubmit('form1', 'upload_down', 'down_key', '<!--{$key}-->[<!--{$index}-->]'); return false;">アップロード</a>
229                </td>
230            </tr>
231        <!--{/section}-->
232    </table>
233
234    <div class="btn-area">
235        <ul>
236            <li><a class="btn-action" href="javascript:;" onclick="fnFormModeSubmit('form1', 'edit', '', ''); return false;"><span class="btn-next">確認ページへ</span></a></li>
237        </ul>
238    </div>
239
240    <!--{/if}-->
241
242</div>
243</form>
Note: See TracBrowser for help on using the repository browser.