From 6aa4566a38f2ef9a9580b976138bfa83e1a7d69d Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Thu, 28 Feb 2013 23:21:19 -0800 Subject: enforce agent-ship_address in backend interface, #21327 --- httemplate/edit/cust_main.cgi | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 3d9aa8002..3f25db173 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -79,7 +79,9 @@ function bill_changed(what) { function fix_ship_city() { what.form.ship_city_select.selectedIndex = what.form.city_select.selectedIndex; what.form.ship_city.style.display = what.form.city.style.display; - what.form.ship_city_select.style.display = what.form.city_select.style.display; + if ( what.form.ship_city_select ) { + what.form.ship_city_select.style.display = what.form.city_select.style.display; + } } function fix_ship_county() { @@ -100,11 +102,15 @@ function samechanged(what) { if ( what.checked ) { bill_changed(what); -% my @fields = qw( last first company address1 address2 city city_select county state zip country latitude longitude daytime night fax mobile ); +% my @fields = qw( last first company address1 address2 city county state zip country latitude longitude daytime night fax mobile ); % for (@fields) { what.form.ship_<%$_%>.disabled = true; what.form.ship_<%$_%>.style.backgroundColor = '#dddddd'; -% } +% } + if ( what.form.ship_city_select ) { + what.form.ship_city_select.disabled = true; + what.form.ship_city_select.style.backgroundColor = '#dddddd'; + } % if ( $conf->exists('cust_main-require_address2') ) { document.getElementById('address2_required').style.visibility = ''; @@ -134,7 +140,7 @@ function samechanged(what) {
<% mt('Service address') |h %> -(><% mt('same as billing address') |h %>) +(><% mt('same as billing address') |h %>) <& cust_main/contact.html, 'cust_main' => $cust_main, 'pre' => 'ship_', -- cgit v1.2.1