| 1 | <!--{* |
---|
| 2 | /* |
---|
| 3 | * This file is part of EC-CUBE |
---|
| 4 | * |
---|
| 5 | * Copyright(c) 2000-2012 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><!--{t string="tpl_598"}--></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><!--{t string="tpl_Product name_01"}--></th> |
---|
| 127 | <td><!--{$arrForm.product_name.value|h}--></td> |
---|
| 128 | </tr> |
---|
| 129 | <tr> |
---|
| 130 | <th><!--{t string="tpl_Standard 1_01"}--><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=""><!--{t string="tpl_Please make a selection_01"}--></option> |
---|
| 139 | <!--{html_options options=$arrClass selected=$arrForm[$key].value}--> |
---|
| 140 | </select> |
---|
| 141 | </td> |
---|
| 142 | </tr> |
---|
| 143 | <tr> |
---|
| 144 | <th><!--{t string="tpl_Standard 2_01"}--></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=""><!--{t string="tpl_Please make a selection_01"}--></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="fnChangeAction('<!--{$smarty.const.ADMIN_PRODUCTS_URLPATH}-->'); fnModeSubmit('search','',''); return false;" ><span class="btn-prev"><!--{t string="tpl_Return_01"}--></span></a></li> |
---|
| 160 | <li><a class="btn-action" href="javascript:;" onclick="fnModeSubmit('disp','',''); return false;"><span class="btn-next"><!--{t string="tpl_599"}--></span></a></li> |
---|
| 161 | <!--{if $arrForm.total.value > 0}--> |
---|
| 162 | <li><a class="btn-action" href="javascript:;" onclick="fnModeSubmit('delete','',''); return false;"><span class="btn-next"><!--{t string="tpl_600"}--></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><!--{t string="tpl_602"}--></span></a></div> |
---|
| 177 | <p><!--{t string="tpl_601" escape="none" T_FIELD=$smarty.const.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><!--{t string="tpl_488"}--></label></th> |
---|
| 197 | <th><!--{t string="tpl_Standard 1_01"}--><br>(<!--{$arrClass[$class_id1]|default_t:"t_Not selected_01"|h}-->)</th> |
---|
| 198 | <th><!--{t string="tpl_Standard 2_01"}--><br>(<!--{$arrClass[$class_id2]|default_t:"t_Not selected_01"|h}-->)</th> |
---|
| 199 | <th><!--{t string="tpl_Product code_01"}--></th> |
---|
| 200 | <th><!--{t string="tpl_557_1" escape="none"}--></th> |
---|
| 201 | <th><!--{t string="tpl_603" escape="none" T_FIELD=$smarty.const.NORMAL_PRICE_TITLE}--></th> |
---|
| 202 | <th><!--{t string="tpl_603" escape="none" T_FIELD=$smarty.const.SALE_PRICE_TITLE}--><span class="attention">*</span></th> |
---|
| 203 | <th><!--{t string="tpl_Product type<span class='attention'> *</span>_01" escape="none"}--></th> |
---|
| 204 | <th><!--{t string="tpl_604" escape="none"}--><span class="red"><br><!--{t string="tpl_606" T_FIELD=$smarty.const.STEXT_LEN}--></span></th> |
---|
| 205 | <th><!--{t string="tpl_605" escape="none"}--></th> |
---|
| 206 | </tr> |
---|
| 207 | <!--{section name=cnt loop=$arrForm.total.value}--> |
---|
| 208 | <!--{assign var=index value=$smarty.section.cnt.index}--> |
---|
| 209 | |
---|
| 210 | <tr> |
---|
| 211 | <td class="center"> |
---|
| 212 | <!--{assign var=key value="classcategory_id1"}--> |
---|
| 213 | <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" /> |
---|
| 214 | <!--{assign var=key value="classcategory_id2"}--> |
---|
| 215 | <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" /> |
---|
| 216 | <!--{assign var=key value="product_class_id"}--> |
---|
| 217 | <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" /> |
---|
| 218 | <!--{assign var=key value="check"}--> |
---|
| 219 | <!--{if $arrErr[$key][$index]}--> |
---|
| 220 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
| 221 | <!--{/if}--> |
---|
| 222 | <input type="checkbox" name="<!--{$key}-->[<!--{$index}-->]" value="1" <!--{if $arrForm[$key].value[$index] == 1}-->checked="checked"<!--{/if}--> id="<!--{$key}-->_<!--{$index}-->" /> |
---|
| 223 | </td> |
---|
| 224 | <td class="center"> |
---|
| 225 | <!--{assign var=key value="classcategory_name1"}--> |
---|
| 226 | <!--{if $arrErr[$key][$index]}--> |
---|
| 227 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
| 228 | <!--{/if}--> |
---|
| 229 | <!--{$arrForm[$key].value[$index]|h}--> |
---|
| 230 | <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" /> |
---|
| 231 | </td> |
---|
| 232 | <td class="center"> |
---|
| 233 | <!--{assign var=key value="classcategory_name2"}--> |
---|
| 234 | <!--{if $arrErr[$key][$index]}--> |
---|
| 235 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
| 236 | <!--{/if}--> |
---|
| 237 | <!--{$arrForm[$key].value[$index]|h}--> |
---|
| 238 | <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" /> |
---|
| 239 | </td> |
---|
| 240 | <td class="center"> |
---|
| 241 | <!--{assign var=key value="product_code"}--> |
---|
| 242 | <!--{if $arrErr[$key][$index]}--> |
---|
| 243 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
| 244 | <!--{/if}--> |
---|
| 245 | <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}-->" /> |
---|
| 246 | </td> |
---|
| 247 | <td class="center"> |
---|
| 248 | <!--{assign var=key value="stock"}--> |
---|
| 249 | <!--{if $arrErr[$key][$index]}--> |
---|
| 250 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
| 251 | <!--{/if}--> |
---|
| 252 | <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}-->" /> |
---|
| 253 | <!--{assign var=key value="stock_unlimited"}--><br /> |
---|
| 254 | <!--{if $arrErr[$key][$index]}--> |
---|
| 255 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
| 256 | <!--{/if}--> |
---|
| 257 | <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}-->"><!--{t string="tpl_No limit"}--></label> |
---|
| 258 | </td> |
---|
| 259 | <td class="center"> |
---|
| 260 | <!--{assign var=key value="price01"}--> |
---|
| 261 | <!--{if $arrErr[$key][$index]}--> |
---|
| 262 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
| 263 | <!--{/if}--> |
---|
| 264 | <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}-->" /> |
---|
| 265 | </td> |
---|
| 266 | <td class="center"> |
---|
| 267 | <!--{assign var=key value="price02"}--> |
---|
| 268 | <!--{if $arrErr[$key][$index]}--> |
---|
| 269 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
| 270 | <!--{/if}--> |
---|
| 271 | <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}-->" /> |
---|
| 272 | </td> |
---|
| 273 | <td class="class-product-type"> |
---|
| 274 | <!--{assign var=key value="product_type_id"}--> |
---|
| 275 | <!--{if $arrErr[$key][$index]}--> |
---|
| 276 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
| 277 | <!--{/if}--> |
---|
| 278 | <!--{foreach from=$arrProductType key=productTypeKey item=productType name=productType}--> |
---|
| 279 | <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}--> |
---|
| 280 | <!--{/foreach}--> |
---|
| 281 | </td> |
---|
| 282 | <td class="center"> |
---|
| 283 | <!--{assign var=key value="down_filename}--> |
---|
| 284 | <!--{if $arrErr[$key][$index]}--> |
---|
| 285 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
| 286 | <!--{/if}--> |
---|
| 287 | <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}-->" /> |
---|
| 288 | </td> |
---|
| 289 | <td> |
---|
| 290 | <!--{assign var=key value="down_realfilename"}--> |
---|
| 291 | <!--{if $arrErr[$key][$index]}--> |
---|
| 292 | <span class="attention"><!--{$arrErr[$key][$index]}--></span> |
---|
| 293 | <!--{/if}--> |
---|
| 294 | <!--{if $arrForm[$key].value[$index] != ""}--> |
---|
| 295 | <!--{$arrForm[$key].value[$index]|h}--><br /> |
---|
| 296 | <input type="hidden" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" /> |
---|
| 297 | <a href="?" onclick="fnFormModeSubmit('form1', 'file_delete', 'upload_index', '<!--{$index}-->'); return false;"><!--{t string="tpl_587}--></a> |
---|
| 298 | <!--{else}--> |
---|
| 299 | <input type="file" name="<!--{$key}-->[<!--{$index}-->]" size="10" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" /><br /> |
---|
| 300 | <a class="btn-normal" href="javascript:;" name="btn" onclick="fnFormModeSubmit('form1', 'file_upload', 'upload_index', '<!--{$index}-->'); return false;"><!--{t string="tpl_Upload_01"}--></a> |
---|
| 301 | <!--{/if}--> |
---|
| 302 | </td> |
---|
| 303 | </tr> |
---|
| 304 | <!--{/section}--> |
---|
| 305 | </table> |
---|
| 306 | |
---|
| 307 | <div class="btn-area"> |
---|
| 308 | <ul> |
---|
| 309 | <li><a class="btn-action" href="javascript:;" onclick="fnFormModeSubmit('form1', 'edit', '', ''); return false;"><span class="btn-next"><!--{t string="tpl_Confirmation page_01"}--></span></a></li> |
---|
| 310 | </ul> |
---|
| 311 | </div> |
---|
| 312 | |
---|
| 313 | <!--{/if}--> |
---|
| 314 | |
---|
| 315 | </div> |
---|
| 316 | </form> |
---|