Changeset 22207


Ignore:
Timestamp:
2013/01/08 12:08:07 (8 years ago)
Author:
m_uehara
Message:

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

File:
1 edited

Legend:

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

    r22205 r22207  
    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; 
     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; 
    3949//        df['shipping_zip01[0]'].value = df.order_zip01.value; 
    4050//        df['shipping_zip02[0]'].value = df.order_zip02.value; 
    41         df['shipping_zipcode'].value = df.order_zipcode.value; 
    42         df['shipping_tel01[0]'].value = df.order_tel01.value; 
    43         df['shipping_tel02[0]'].value = df.order_tel02.value; 
    44         df['shipping_tel03[0]'].value = df.order_tel03.value; 
    45         df['shipping_fax01[0]'].value = df.order_fax01.value; 
    46         df['shipping_fax02[0]'].value = df.order_fax02.value; 
    47         df['shipping_fax03[0]'].value = df.order_fax03.value; 
    48         df['shipping_addr01[0]'].value = df.order_addr01.value; 
    49         df['shipping_addr02[0]'].value = df.order_addr02.value; 
     51        df['shipping_zipcode'+shipping_key].value = df.order_zipcode.value; 
     52        df['shipping_tel01'+shipping_key].value = df.order_tel01.value; 
     53        df['shipping_tel02'+shipping_key].value = df.order_tel02.value; 
     54        df['shipping_tel03'+shipping_key].value = df.order_tel03.value; 
     55        df['shipping_fax01'+shipping_key].value = df.order_fax01.value; 
     56        df['shipping_fax02'+shipping_key].value = df.order_fax02.value; 
     57        df['shipping_fax03'+shipping_key].value = df.order_fax03.value; 
     58        df['shipping_addr01'+shipping_key].value = df.order_addr01.value; 
     59        df['shipping_addr02'+shipping_key].value = df.order_addr02.value; 
    5060    } 
    5161 
Note: See TracChangeset for help on using the changeset viewer.