Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / httemplate / elements / tr-select-cust_location.html
index 05712ee..7ffbd6c 100644 (file)
@@ -52,10 +52,11 @@ Example:
       if( ftype != 'SELECT') what.form.<%$_%>.style.backgroundColor = '#ffffff';
 %   } 
 %   if ( $opt{'alt_format'} ) {
-    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';
-    }
+      }
 %   }
   }
 
@@ -216,6 +217,7 @@ Example:
              'no_asterisks' => 1,
              'no_bold'      => $opt{'no_bold'},
              'alt_format'   => $opt{'alt_format'},
+             'enable_coords'=> 1,
           )
 %>
 <SCRIPT TYPE="text/javascript">
@@ -280,6 +282,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)
@@ -287,7 +291,7 @@ my $location_sort = sub {
   or lc($a->address2) cmp lc($b->address2)
 };
 
-my @cust_location = ();
+my @cust_location;
 push @cust_location, $cust_main->cust_location if $cust_main;
 push @cust_location, $prospect_main->cust_location if $prospect_main;
 push @cust_location, $cust_location