v4 style
[freeside.git] / httemplate / search / report_svc_acct.html
index c7fac46..3b8e464 100755 (executable)
@@ -1,29 +1,24 @@
-<% include('/elements/header.html', $title ) %>
+<& /elements/header.html, $title &>
 
 <FORM ACTION="svc_acct.cgi" METHOD="GET">
 <INPUT TYPE="hidden" NAME="magic" VALUE="advanced">
 <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
 
-  <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
-
-    <TR>
-      <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Search options</FONT></TH>
-    </TR>
+  <FONT CLASS="fsinnerbox-title"><% emt('Search options') %></FONT>
+  <TABLE CLASS="fsinnerbox">
 
 % unless ( $custnum ) {
-    <% include( '/elements/tr-select-agent.html',
+    <& /elements/tr-select-agent.html,
                    'curr_value'    => scalar( $cgi->param('agentnum') ),
                    'disable_empty' => 0,
-              )
-    %>
+    &>
 
 %   # just this customer's domains?
-    <% include( '/elements/tr-select-domain.html',
+    <& /elements/tr-select-domain.html,
                    'element_name'  => 'domsvc',
                    'curr_value'    => scalar( $cgi->param('domsvc') ),
                    'disable_empty' => 0,
-              )
-    %>
+    &>
 % }
 
     <SCRIPT type="text/javascript">
         <TD>
           <TABLE>
             <TR>
-              <TD ALIGN="right" VALIGN="center" ID="<% $field."_label" %>">
+              <TH ALIGN="right" VALIGN="center" ID="<% $field."_label" %>">
                 <% $label{$field} %>
-              </TD>
-              <TD>
+              </TH>
+              <TH>
                 <INPUT NAME="<% $invert %>" ID="<% $invert %>" TYPE="hidden">
-                <A HREF="javascript:void(0)" onClick="toggle('<% $field %>'); return false;">Invert</A>
-              </TD>
+                <A HREF="javascript:void(0)" onClick="toggle('<% $field %>'); return false;"><% mt('Invert') |h %></A>
+              </TH>
             </TR>
           </TABLE>
         </TD>
         <TD>
           <TABLE>
-            <% include( '/elements/tr-input-beginning_ending.html',
+            <& /elements/tr-input-beginning_ending.html,
                           prefix   => $field,
                           layout   => 'horiz',
-                      )
-            %>
+            &>
           </TABLE>
         </TD>
       </TR>
 
 %   }
     
-    <% include( '/elements/tr-selectmultiple-part_pkg.html' ) %> 
+    <& /elements/tr-selectmultiple-part_pkg.html &> 
+
+%   my $conf = new FS::Conf;
+%   if ( $conf->exists('svc_acct-tower_sector') 
+%        and FS::tower_sector->count > 0 ) {
+    <& /elements/tr-select-tower_sector.html,
+          'multiple'    => 1,
+          'label'       => 'Tower/Sector',
+    &>
+%   }
 
-    <TR>
-      <TH CLASS="background" COLSPAN=2>&nbsp;</TH>
-    </TR>
-    <TR>
-      <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
-    </TR>
 
+  </TABLE>
+  <BR>
+
+  <FONT CLASS="fsinnerbox-title"><% emt('Display options') %></FONT>
+  <TABLE CLASS="fsinnerbox">
 %   #move to /elements/tr-select-cust_pkg-fields if anything else needs it...
     <TR>
-      <TD ALIGN="right">Package fields</TD>
+      <TH ALIGN="right"><% mt('Package fields') |h %></TH>
       <TD>
         <SELECT NAME="cust_pkg_fields">
-          <OPTION VALUE="">(none)
-          <OPTION VALUE="setup,last_bill,bill,cancel">Setup date | Last bill date | Next bill date | Cancel date
+          <OPTION VALUE=""><% mt('(none)') |h %> 
+          <OPTION VALUE="setup,last_bill,bill,cancel"><% mt('Setup date | Last bill date | Next bill date | Cancel date') |h %> 
         </SELECT>
       </TD>
     </TR>
 
-    <% include( '/elements/tr-select-cust-fields.html' ) %>
+    <& /elements/tr-select-cust-fields.html &>
                        
   </TABLE>
 
 <BR>
-<INPUT TYPE="submit" VALUE="Get Report">
+<INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
 
 </FORM>
 
-<% include('/elements/footer.html') %>
+<& /elements/footer.html &>
 <%init>
 
 die "access denied"
-  unless $FS::CurrentUser::CurrentUser->access_right('List packages'); #?
+  unless $FS::CurrentUser::CurrentUser->access_right('Services: Accounts: Advanced search'); #?
 
-my $title = 'Account Report';
+my $title = mt('Account Report');
 
 #false laziness w/report_cust_pkg.html
 my $custnum = '';
@@ -120,7 +122,7 @@ if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
     'hashref'   => { 'custnum' => $custnum },
     'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
   }) or die "unknown custnum $custnum";
-  $title .= ': '. $cust_main->name;
+  $title = mt("Account Report: [_1]", $cust_main->name);
 }
 
 </%init>