<& 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') || '';
- <INPUT NAME="latitude" TYPE="hidden" VALUE="<% $latitude |h %>">
- <INPUT NAME="longitude" TYPE="hidden" VALUE="<% $longitude |h %>">
-% }
-
%# contact info
% my $same_checked = '';
set_censustract = function () {
- cf.elements['censustract'].value = newcensus
+ cf.elements['censustract'].value = newcensus;
cf.submit();
}
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 =
'<CENTER><BR><B>Confirm censustract</B><BR>' +
'<A href="http://maps.ffiec.gov/FFIECMapper/TGMapSrv.aspx?' +
'census_year=<% $conf->config('census_year') || '2012' %>' +
- '&latitude=' + cf.elements['latitude'].value +
- '&longitude=' + cf.elements['longitude'].value +
+ '&latitude=' + latitude +
+ '&longitude=' + longitude +
'" target="_blank">Map service module location</A><BR>' +
'<A href="http://maps.ffiec.gov/FFIECMapper/TGMapSrv.aspx?' +
'census_year=<% $conf->config('census_year') || '2012' %>' +
my $conf = new FS::Conf;
+my $company_latitude = $conf->config('company_latitude');
+my $company_longitude = $conf->config('company_longitude');
+
+
</%init>