X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-cust_location.html;h=d9e3e9e27a3bc164760bb9af6da09915f9d2469b;hb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500;hp=b882c3d461892b673aff43f5413503faf08e73b7;hpb=25b48e1acbf6ad7ebd3e85b479ee6cd3a8ccd098;p=freeside.git diff --git a/httemplate/elements/tr-select-cust_location.html b/httemplate/elements/tr-select-cust_location.html index b882c3d46..d9e3e9e27 100644 --- a/httemplate/elements/tr-select-cust_location.html +++ b/httemplate/elements/tr-select-cust_location.html @@ -11,7 +11,6 @@ Example: #optional 'empty_label' => '(default service address)', - 'disable_empty' => 0, #1 to disable ) @@ -52,11 +51,12 @@ Example: var ftype = what.form.<%$_%>.tagName; if( ftype != 'SELECT') what.form.<%$_%>.style.backgroundColor = '#ffffff'; % } - +% if ( $opt{'alt_format'} ) { if ( what.form.location_type.options[what.form.location_type.selectedIndex].value ) { what.form.location_number.disabled = false; what.form.location_number.style.backgroundColor = '#ffffff'; } +% } } function locationnum_changed(what) { @@ -101,25 +101,8 @@ Example: return; } - if ( locationnum == 0 ) { //(default service address) -% if ( $cust_main ) { - what.form.address1.value = <% $cust_main->get($prefix.'address1') |js_string %>; - what.form.address2.value = <% $cust_main->get($prefix.'address2') |js_string %>; - what.form.city.value = <% $cust_main->get($prefix.'city') |js_string %>; - what.form.zip.value = <% $cust_main->get($prefix.'zip') |js_string %>; - - changeSelect(what.form.country, <% $cust_main->get($prefix.'country') | js_string %> ); - - country_changed( what.form.country, - fix_state_factory( <% $cust_main->get($prefix.'state') | js_string %>, - <% $cust_main->get($prefix.'county') | js_string %> - ) - ); -% } - - } else { - get_location( locationnum, update_location ); - } +%# default service address is now just another location + get_location( locationnum, update_location ); % if ( $editable ) { if ( locationnum == 0 ) { @@ -197,17 +180,22 @@ Example: - <<%$th%> ALIGN="right"><% $opt{'label'} || 'Service location' %>> + <<%$th%> ALIGN="right"><% $opt{'label'} || emt('Service location') %>> - +% if ( $cust_main ) { +