combine ticket notification scrips, #15353
[freeside.git] / httemplate / view / cust_main / locations.html
index 319a927..98c9336 100755 (executable)
@@ -10,7 +10,7 @@ span.loclabel {
 %   my $packages = $packages_in{$locationnum};
 %   my $loc = $locations{$locationnum};
 %   next if $loc->disabled and scalar(@$packages) == 0;
-<% include('/elements/table-grid.html') %>
+<& /elements/table-grid.html &>
 <TR><TH COLSPAN=3 ALIGN="left" VALIGN="bottom" 
 STYLE="padding-bottom: 0px; 
   padding-left: 0px; 
@@ -19,7 +19,7 @@ STYLE="padding-bottom: 0px;
   border-bottom-width: 1px;">
 <SPAN CLASS="loclabel">
 %   if (! $locationnum) {
-Default service location: 
+<% mt('Default service location:') |h %> 
 %   }
 %   elsif ( $loc->disabled ) {
 <FONT COLOR="#808080"><I>
@@ -29,12 +29,12 @@ Default service location:
 % if ( $locationnum and !$loc->disabled ) {
 <% edit_location_link($locationnum) %>
 % }
-% if ( !$loc->disabled and !$active{$locationnum} ) {
+% if ( $locationnum and !$loc->disabled and !$active{$locationnum} ) {
 &nbsp;<% disable_location_link($locationnum) %>
 % }
 </SPAN></TH></TR>
 %   if (@$packages) {
-<% include('packages/section.html', 'packages' => $packages ) %>
+<& packages/section.html, 'packages' => $packages &>
 %   }
 </TABLE><BR>
 % } #foreach $locationnum
@@ -50,7 +50,7 @@ my %locations = map { $_->locationnum => $_ } qsearch({
   });
 my @sections = keys %locations;
 $locations{''} = $cust_main;
-my %packages_in = map { $_ => [] } @sections;
+my %packages_in = map { $_ => [] } ('', @sections);
 
 my %active = (); # groups with non-canceled packages
 foreach my $cust_pkg ( @$all_packages ) {
@@ -69,8 +69,8 @@ sub edit_location_link {
   my $locationnum = shift;
   include( '/elements/popup_link.html',
     'action'      => $p. "edit/cust_location.cgi?locationnum=$locationnum",
-    'label'       => '(Edit location)',
-    'actionlabel' => 'Edit',
+    'label'       => '('.emt('Edit location').')',
+    'actionlabel' => emt('Edit'),
   );
 }
 
@@ -78,10 +78,9 @@ sub disable_location_link {
   my $locationnum = shift;
   include( '/elements/popup_link.html',
     'action'      => $p. "misc/disable-cust_location.cgi?locationnum=$locationnum",
-    'label'       => '(Disable location)',
-    'actionlabel' => 'Disable',
+    'label'       => '('.emt('Disable location').')',
+    'actionlabel' => emt('Disable'),
   );
 }
 
-
 </%init>