user confirmation for FFIEC censustract lookups
[freeside.git] / httemplate / elements / tr-select-cust_location.html
index 8b1895f..801152e 100644 (file)
@@ -53,7 +53,8 @@ Example:
       if( ftype != 'SELECT') what.form.<%$_%>.style.backgroundColor = '#ffffff';
 %   } 
 
-    if ( what.form.location_type.options[what.form.location_type.selectedIndex].value ) {
+    if ( what.form.location_type &&
+         what.form.location_type.options[what.form.location_type.selectedIndex].value ) {
       what.form.location_number.disabled = false;
       what.form.location_number.style.backgroundColor = '#ffffff';
     }
@@ -197,7 +198,7 @@ Example:
 </SCRIPT>
 
 <TR>
-  <<%$th%> ALIGN="right"><% $opt{'label'} || 'Service&nbsp;location' %></<%$th%>>
+  <<%$th%> ALIGN="right"><% $opt{'label'} || emt('Service location') %></<%$th%>>
   <TD COLSPAN=7>
     <SELECT NAME     = "locationnum"
             ID       = "locationnum"
@@ -270,7 +271,9 @@ if ( $cgi->param('error') ) {
 my $editable = $cust_main ? 0 : 1; #could use explicit control
 my $addnew = $cust_main ? 1 : ( $locationnum>0 ? 0 : 1 );
 
-my @location_fields = qw( address1 address2 city county state zip country );
+my @location_fields = qw( address1 address2 city county state zip country
+                          latitude longitude
+                        );
 if ( $opt{'alt_format'} ) {
     push @location_fields, qw( location_type location_number location_kind );
 }
@@ -292,6 +295,8 @@ if ( $locationnum && $locationnum > 0 ) {
   }
 }
 
+$cust_location->coord_auto('Y');
+
 my $location_sort = sub {
         $a->country   cmp $b->country
   or lc($a->city)     cmp lc($b->city)