Changeset 22216


Ignore:
Timestamp:
2013/01/09 09:31:28 (8 years ago)
Author:
m_uehara
Message:

#2005 JavaScript?の関数で使用している変数を可変に変更しました。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/Smarty/templates/admin/order/edit.tpl

    r22215 r22216  
    3535    function fnCopyFromOrderData() { 
    3636        df = document.form1; 
    37         df['shipping_name01[0]'].value = df.order_name01.value; 
    38         df['shipping_name02[0]'].value = df.order_name02.value; 
    39         df['shipping_kana01[0]'].value = df.order_kana01.value; 
    40         df['shipping_kana02[0]'].value = df.order_kana02.value; 
    41         df['shipping_zip01[0]'].value = df.order_zip01.value; 
    42         df['shipping_zip02[0]'].value = df.order_zip02.value; 
    43         df['shipping_tel01[0]'].value = df.order_tel01.value; 
    44         df['shipping_tel02[0]'].value = df.order_tel02.value; 
    45         df['shipping_tel03[0]'].value = df.order_tel03.value; 
    46         df['shipping_fax01[0]'].value = df.order_fax01.value; 
    47         df['shipping_fax02[0]'].value = df.order_fax02.value; 
    48         df['shipping_fax03[0]'].value = df.order_fax03.value; 
    49         df['shipping_pref[0]'].value = df.order_pref.value; 
    50         df['shipping_addr01[0]'].value = df.order_addr01.value; 
    51         df['shipping_addr02[0]'].value = df.order_addr02.value; 
     37 
     38        // お届け先名のinputタグのnameを取得 
     39        var shipping_data = $('input[name^=shipping_name01]').attr('name');  
     40        var shipping_slt  = shipping_data.split("shipping_name01"); 
     41         
     42        var shipping_key = "[0]"; 
     43        if(shipping_slt.length > 1) { 
     44            shipping_key = shipping_slt[1]; 
     45        } 
     46 
     47        df['shipping_name01'+shipping_key].value = df.order_name01.value; 
     48        df['shipping_name02'+shipping_key].value = df.order_name02.value; 
     49        df['shipping_kana01'+shipping_key].value = df.order_kana01.value; 
     50        df['shipping_kana02'+shipping_key].value = df.order_kana02.value; 
     51        df['shipping_zip01'+shipping_key].value = df.order_zip01.value; 
     52        df['shipping_zip02'+shipping_key].value = df.order_zip02.value; 
     53        df['shipping_tel01'+shipping_key].value = df.order_tel01.value; 
     54        df['shipping_tel02'+shipping_key].value = df.order_tel02.value; 
     55        df['shipping_tel03'+shipping_key].value = df.order_tel03.value; 
     56        df['shipping_fax01'+shipping_key].value = df.order_fax01.value; 
     57        df['shipping_fax02'+shipping_key].value = df.order_fax02.value; 
     58        df['shipping_fax03'+shipping_key].value = df.order_fax03.value; 
     59        df['shipping_addr01'+shipping_key].value = df.order_addr01.value; 
     60        df['shipping_addr02'+shipping_key].value = df.order_addr02.value; 
    5261    } 
    5362 
Note: See TracChangeset for help on using the changeset viewer.