From caba365bbebc7e73ad0c25f9a3a9c75a48ed6140 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Fri, 24 Feb 2012 16:21:49 -0800 Subject: [PATCH] fix latitude/longitude w/cust_main-require_censustract, RT#16479 --- httemplate/edit/cust_main.cgi | 9 --------- httemplate/edit/cust_main/bottomfixup.js | 13 ++++++++++--- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index e823f7c93..14825d055 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -31,15 +31,6 @@ <& cust_main/birthdate.html, $cust_main &> % } -%# latitude and longitude -% if ( $conf->exists('cust_main-require_censustract') ) { -% my ($latitude, $longitude) = $cust_main->service_coordinates; -% $latitude ||= $conf->config('company_latitude') || ''; -% $longitude ||= $conf->config('company_longitude') || ''; - - -% } - %# contact info % my $same_checked = ''; diff --git a/httemplate/edit/cust_main/bottomfixup.js b/httemplate/edit/cust_main/bottomfixup.js index bcddd7edf..6b30cbc80 100644 --- a/httemplate/edit/cust_main/bottomfixup.js +++ b/httemplate/edit/cust_main/bottomfixup.js @@ -76,7 +76,7 @@ function update_censustract(arg) { set_censustract = function () { - cf.elements['censustract'].value = newcensus + cf.elements['censustract'].value = newcensus; cf.submit(); } @@ -87,12 +87,15 @@ function update_censustract(arg) { if (error) { newcensus = error; } newcensus.replace(/.*ndefined.*/, 'Not found'); + var latitude = cf.elements['latitude' ].value || '<% $company_latitude %>'; + var longitude= cf.elements['longitude'].value || '<% $company_longitude %>'; + var choose_censustract = '

Confirm censustract
' + 'Map service module location
' + '