From: Ivan Kohler Date: Sat, 25 Feb 2012 00:21:49 +0000 (-0800) Subject: fix latitude/longitude w/cust_main-require_censustract, RT#16479 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=caba365bbebc7e73ad0c25f9a3a9c75a48ed6140 fix latitude/longitude w/cust_main-require_censustract, RT#16479 --- 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
' + '