internationalization/localization, RT12515
authorlevinse <levinse>
Mon, 23 May 2011 16:25:27 +0000 (16:25 +0000)
committerlevinse <levinse>
Mon, 23 May 2011 16:25:27 +0000 (16:25 +0000)
17 files changed:
httemplate/edit/cust_bill_pay.cgi
httemplate/edit/cust_credit.cgi
httemplate/edit/cust_main.cgi
httemplate/edit/cust_main/billing.html
httemplate/edit/cust_main/contact.html
httemplate/edit/cust_main/first_pkg.html
httemplate/edit/cust_main/first_pkg/select-part_pkg.html
httemplate/edit/cust_main/first_pkg/svc_acct.html
httemplate/edit/cust_main/top_misc.html
httemplate/edit/msgcat.cgi
httemplate/edit/process/change-cust_pkg.html
httemplate/edit/process/cust_credit.cgi
httemplate/edit/process/cust_main.cgi
httemplate/edit/process/cust_pay.cgi
httemplate/edit/process/quick-charge.cgi
httemplate/edit/process/quick-cust_pkg.cgi
httemplate/edit/svc_acct.cgi

index 532db6a..f620fc5 100755 (executable)
@@ -1,11 +1,10 @@
-<% include('elements/ApplicationCommon.html',
+<& elements/ApplicationCommon.html,
      'form_action' => 'process/cust_bill_pay.cgi',
      'src_table'   => 'cust_pay',
-     'src_thing'   => 'payment',
+     'src_thing'   => emt('payment'),
      'dst_table'   => 'cust_bill',
-     'dst_thing'   => 'invoice',
-   )
-%>
+     'dst_thing'   => emt('invoice'),
+&>
 <%init>
 
 die "access denied"
index d5e53b8..0681445 100755 (executable)
@@ -1,6 +1,6 @@
-<% include('/elements/header-popup.html', 'Enter Credit') %>
+<& /elements/header-popup.html, emt('Enter Credit') &>
 
-<% include('/elements/error.html') %>
+<& /elements/error.html &>
 
 <FORM NAME="credit_popup" ACTION="<% $p1 %>process/cust_credit.cgi" METHOD=POST>
 <INPUT TYPE="hidden" NAME="crednum" VALUE="">
 <% ntable("#cccccc", 2) %>
 
   <TR>
-    <TD ALIGN="right">Date</TD>
+    <TD ALIGN="right"><% mt('Date') |h %></TD>
     <TD BGCOLOR="#ffffff"><% time2str($date_format, $_date) %></TD>
   </TR>
 
   <TR>
-    <TD ALIGN="right">Amount</TD>
+    <TD ALIGN="right"><% mt('Amount') |h %></TD>
     <TD BGCOLOR="#ffffff">$<INPUT TYPE="text" NAME="amount" VALUE="<% $amount |h %>" SIZE=8 MAXLENGTH=9></TD>
   </TR>
 
-%
-%#print qq! <INPUT TYPE="checkbox" NAME="refund" VALUE="$refund">Also post refund!;
-%
-
-<% include( '/elements/tr-select-reason.html',
+<& /elements/tr-select-reason.html,
               'field'          => 'reasonnum',
               'reason_class'   => 'R',
               'control_button' => "document.getElementById('confirm_credit_button')",
               'cgi'            => $cgi,
-           )
-%>
+&>
 
   <TR>
-    <TD ALIGN="right">Additional info</TD>
+    <TD ALIGN="right"><% mt('Additional info') |h %></TD>
     <TD>
       <INPUT TYPE="text" NAME="addlinfo" VALUE="<% $cgi->param('addlinfo') |h %>">
     </TD>
         <INPUT TYPE="HIDDEN" NAME="apply" VALUE="no">
 % } else {
   <TR>
-    <TD ALIGN="right">Auto-apply<BR>to invoices</TD>
-    <TD><SELECT NAME="apply"><OPTION VALUE="yes" SELECTED>yes<OPTION>no</SELECT></TD>
+    <TD ALIGN="right"><% mt('Auto-apply to invoices') |h %></TD>
+    <TD><SELECT NAME="apply"><OPTION VALUE="yes" SELECTED><% mt('yes') |h %><OPTION><% mt('no') |h %></SELECT></TD>
   </TR>
 % }
 
 % if ( $conf->exists('pkg-balances') ) {
-  <% include('/elements/tr-select-cust_pkg-balances.html',
+  <& /elements/tr-select-cust_pkg-balances.html,
                'custnum' => $custnum,
                'cgi'     => $cgi
-            )
-  %>
+  &>
 % } else {
   <INPUT TYPE="hidden" NAME="pkgnum" VALUE="">
 % }
@@ -63,7 +57,7 @@
 
 <BR>
 
-<CENTER><INPUT TYPE="submit" ID="confirm_credit_button" VALUE="Enter credit" DISABLED></CENTER>
+<CENTER><INPUT TYPE="submit" ID="confirm_credit_button" VALUE="<% mt('Enter credit') |h %>" DISABLED></CENTER>
 
 </FORM>
 </BODY>
index 61d92b9..1c188dc 100755 (executable)
@@ -1,16 +1,14 @@
-<% include('/elements/header.html',
+<& /elements/header.html,
       $title,
       '',
       ' onUnload="myclose()"' #hmm, in billing.html
-) %>
+&>
 
-<% include('/elements/error.html') %>
+<& /elements/error.html &>
 
 <FORM NAME   = "CustomerForm"
       METHOD = "POST"
       ACTION = "<% popurl(1) %>process/cust_main.cgi"
-%#      STYLE = "margin-bottom: 0"
-%#      STYLE="margin-top: 0; margin-bottom: 0">
 >
 
 <INPUT TYPE="hidden" NAME="custnum"     VALUE="<% $custnum %>">
 % } 
 
 %# agent, agent_custid, refnum (advertising source), referral_custnum
-<% include('cust_main/top_misc.html', $cust_main, 'custnum' => $custnum ) %>
+<& cust_main/top_misc.html, $cust_main, 'custnum' => $custnum  &>
 
 %# birthdate
 % if ( $conf->exists('cust_main-enable_birthdate') ) {
   <BR>
-  <% include('cust_main/birthdate.html', $cust_main) %>
+  <& cust_main/birthdate.html, $cust_main &>
 % }
 
 %# latitude and longitude
@@ -62,7 +60,7 @@
 <BR>
 <FONT SIZE="+1"><B>Billing address</B></FONT>
 
-<% include('cust_main/contact.html',
+<& cust_main/contact.html,
              'cust_main'    => $cust_main,
              'pre'          => '',
              'onchange'     => 'bill_changed(this)',
@@ -70,8 +68,7 @@
              'ss'           => $ss,
              'stateid'      => $stateid,
              'same_checked' => $same_checked, #for address2 "Unit #" labeling
-          )
-%>
+&>
 
 <SCRIPT>
 function bill_changed(what) {
@@ -138,29 +135,27 @@ function samechanged(what) {
 </SCRIPT>
 
 <BR>
-<FONT SIZE="+1"><B>Service address</B></FONT>
+<FONT SIZE="+1"><B><% mt('Service address') |h %></B></FONT>
 
-(<INPUT TYPE="checkbox" NAME="same" VALUE="Y" onClick="samechanged(this)" <%$same_checked%>>same as billing address)
-<% include('cust_main/contact.html',
+(<INPUT TYPE="checkbox" NAME="same" VALUE="Y" onClick="samechanged(this)" <%$same_checked%>><% mt('same as billing address') |h %>)
+<& cust_main/contact.html,
              'cust_main' => $cust_main,
              'pre'       => 'ship_',
              'onchange'  => '',
              'disabled'  => $ship_disabled,
              'style'     => \@ship_style
-          )
-%>
+&>
 
 %# billing info
-<% include( 'cust_main/billing.html', $cust_main,
+<& cust_main/billing.html, $cust_main,
                'payinfo'        => $payinfo,
                'invoicing_list' => \@invoicing_list,
-           )
-%>
+&>
 
 % my $ro_comments = $conf->exists('cust_main-use_comments')?'':'readonly';
 % if (!$ro_comments || $cust_main->comments) {
 
-    <BR>Comments
+    <BR><% mt('Comments') |h %> 
     <% &ntable("#cccccc") %>
       <TR>
         <TD>
@@ -178,19 +173,17 @@ function samechanged(what) {
 
 % unless ( $custnum ) {
 
-    <% include('cust_main/first_pkg.html', $cust_main,
+    <& cust_main/first_pkg.html, $cust_main,
                  'pkgpart_svcpart' => $pkgpart_svcpart,
                  'disable_empty'   =>
                    scalar( $cgi->param('lock_pkgpart') =~ /^(\d+)$/ ),
-                 #svc_acct
                  'username'        => $username,
                  'password'        => $password,
                  'popnum'          => $popnum,
                  'saved_domsvc'    => $saved_domsvc,
                  %svc_phone,
                  %svc_dsl,
-              )
-    %>
+    &>
 
 % }
 
@@ -210,7 +203,7 @@ function samechanged(what) {
     <INPUT TYPE="hidden" NAME="<% $hidden %>" VALUE="">
 % } 
 
-<% include('cust_main/bottomfixup.html') %>
+<& cust_main/bottomfixup.html &>
 
 <BR>
 <INPUT TYPE    = "button"
@@ -221,7 +214,7 @@ function samechanged(what) {
 >
 </FORM>
 
-<% include('/elements/footer.html') %>
+<& /elements/footer.html &>
 
 <%init>
 
@@ -373,6 +366,7 @@ my %keep = map { $_=>1 } qw( error tagnum lock_agentnum lock_pkgpart );
 $cgi->delete( grep !$keep{$_}, $cgi->param );
 
 my $title = $custnum ? 'Edit Customer' : 'Add Customer';
+$title = emt($title);
 $title .= ": ". $cust_main->name if $custnum;
 
 my $r = qq!<font color="#ff0000">*</font>&nbsp;!;
index 7c053dc..07266b9 100644 (file)
@@ -1,5 +1,4 @@
 %if ( $payby_default eq 'HIDE' ) {
-%
 %  $cust_main->payby('BILL') unless $cust_main->payby;
 %  my $payby = $cust_main->payby;
 
 %
 %  my $r = qq!<font color="#ff0000">*</font>&nbsp;!;
 
-  <BR><FONT SIZE="+1"><B>Billing information</B></FONT>
+  <BR><FONT SIZE="+1"><B><% mt('Billing information') |h %></B></FONT>
   <% &ntable("#cccccc") %>
 
     <TR>
-      <TD ALIGN="right" WIDTH="200"><%$r%>Billing type</TD>
+      <TD ALIGN="right" WIDTH="200"><%$r%><% mt('Billing type') |h %></TD>
 
   <SCRIPT>
 
 
   </SCRIPT>
 
-  <% include('/elements/init_overlib.html') %>
+  <& /elements/init_overlib.html &>
 
 %  my $payby = $cust_main->payby;
 %  my $paytype = $cust_main->paytype;
 %
 %      '<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0 HEIGHT=192>'.
 %
-%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}Card number </TD>!.
+%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt('Card number').qq! </TD>!.
 %          qq!<TD WIDTH="408"><INPUT TYPE="text" NAME="CARD_payinfo" VALUE="!. ( $payby =~ /^(CARD|DCRD)$/ ? $payinfo : '' ). qq!" MAXLENGTH=19 onChange="card_changed(this)" onKeyUp="card_changed(this)"></TD></TR>!.
 %
-%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}Expiration </TD>!.
+%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt('Expiration').qq! </TD>!.
 %          '<TD WIDTH="408">'.
 %
 %          include('/elements/select-month_year.html',
 %
 %          '</TD></TR>'.
 %
-%        qq!<TR><TD ALIGN="right" WIDTH="200">CVV2&nbsp;!.
+%        qq!<TR><TD ALIGN="right" WIDTH="200">!.emt('CVV2').qq!&nbsp;!.
 %
-%          qq!(<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('../docs/cvv2.html', 480, 352, 'cvv2_popup' ), CAPTION, 'CVV2 Help', STICKY, AUTOSTATUSCAP, CLOSECLICK, DRAGGABLE ); return false;">help</A>)!.
+%          qq!(<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('../docs/cvv2.html', 480, 352, 'cvv2_popup' ), CAPTION, 'CVV2 Help', STICKY, AUTOSTATUSCAP, CLOSECLICK, DRAGGABLE ); return false;">!.emt('help').qq!</A>)!.
 %          qq!</TD>!.
 %          '<TD WIDTH="408"><INPUT TYPE="text" NAME="CARD_paycvv" VALUE="'. ( $payby =~ /^(CARD|DCRD)$/ && !$cust_main->is_encrypted($cust_main->paycvv) ? $cust_main->paycvv : '' ). '" SIZE=4 MAXLENGTH=4>'.
 %
-%
-%        qq!<TR><TD ALIGN="right" WIDTH="200"><SPAN ID="paystart_label" $text_disabled>Start date </SPAN></TD>!.
+%        qq!<TR><TD ALIGN="right" WIDTH="200"><SPAN ID="paystart_label" $text_disabled>!.emt('Start date').qq! </SPAN></TD>!.
 %          '<TD WIDTH="408">'.
 %
 %          include('/elements/select-month_year.html',
 %                    )
 %                 ).
 %
-%        qq!<SPAN ID="payissue_label" $text_disabled> or Issue number </SPAN>!.
+%        qq!<SPAN ID="payissue_label" $text_disabled>!.emt('or Issue number').qq! </SPAN>!.
 %          '<INPUT TYPE="text" NAME="CARD_payissue" VALUE="'. ( $payby =~ /^(CARD|DCRD)$/ ? $cust_main->payissue : '' ). qq!" SIZE=3 MAXLENGTH=2 $disabled></TD></TR>!.
 %
-%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}Exact name on card </TD>!.
+%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt('Exact name on card').qq! </TD>!.
 %          qq!<TD WIDTH="408"><INPUT TYPE="text" NAME="CARD_payname" VALUE="!. ( $payby =~ /^(CARD|DCRD)$/ ? $cust_main->payname : '' ). qq!"></TD></TR>!.
 %
-%        qq!<TR><TD COLSPAN=2 WIDTH="608"><INPUT TYPE="checkbox" onchange="payauto_changed(this);" NAME="CARD_payauto" $CARD_payauto_checked> Charge future payments to this card automatically</TD></TR>!.
+%        qq!<TR><TD COLSPAN=2 WIDTH="608"><INPUT TYPE="checkbox" onchange="payauto_changed(this);" NAME="CARD_payauto" $CARD_payauto_checked> !.emt('Charge future payments to this card automatically').qq!</TD></TR>!.
 %
 %      ( $conf->exists('cust_main-select-billday') ?
 %        qq!<TR><TD COLSPAN=2 WIDTH="608" id="card_billday" style="display: $billday_card_display">
 %
 %      '<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0 HEIGHT=192>'.
 %
-%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}Account number </TD>!.
+%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt('Account number').qq! </TD>!.
 %          qq!<TD><INPUT TYPE="text" SIZE=12 NAME="CHEK_payinfo1" VALUE="!. ( $payby =~ /^(CHEK|DCHK)$/ ? $account : '' ). '"></TD>'.
-%          qq!<TD ALIGN="right">Type</TD><TD><SELECT NAME="CHEK_paytype">!.
+%          qq!<TD ALIGN="right">!.emt('Type').qq!</TD><TD><SELECT NAME="CHEK_paytype">!.
 %            join('', map { qq!<OPTION VALUE="$_" !.($paytype eq $_ ? 'SELECTED' : '').">$_</OPTION>" } @FS::cust_main::paytypes).
 %          qq!</SELECT></TD></TR>!.
 %
-%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}ABA/Routing number </TD>!.
+%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt('ABA/Routing number').qq! </TD>!.
 %          qq!<TD COLSPAN="3" WIDTH="408"><INPUT TYPE="text" SIZE=10 MAXLENGTH=9 NAME="CHEK_payinfo2" VALUE="!. ( $payby =~ /^(CHEK|DCHK)$/ ? $aba : '' ). qq!" SIZE=10 MAXLENGTH=9> !.
-%          qq!(<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('../docs/ach.html', 380, 240, 'ach_popup' ), CAPTION, 'ACH Help', STICKY, AUTOSTATUSCAP, CLOSECLICK, DRAGGABLE ); return false;">help</A>)!.
+%          qq!(<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('../docs/ach.html', 380, 240, 'ach_popup' ), CAPTION, 'ACH Help', STICKY, AUTOSTATUSCAP, CLOSECLICK, DRAGGABLE ); return false;">!.emt('help').qq!</A>)!.
 %          qq!</TD></TR>!.
 %
 %        qq!<INPUT TYPE="hidden" NAME="CHEK_exp_month" VALUE="12">!.
 %        qq!<INPUT TYPE="hidden" NAME="CHEK_exp_year" VALUE="2037">!.
 %
-%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}Bank name </TD>!.
+%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt('Bank name').qq! </TD>!.
 %          qq!<TD COLSPAN="3" WIDTH="408"><INPUT TYPE="text" NAME="CHEK_payname" VALUE="!. ( $payby =~ /^(CHEK|DCHK)$/ ? $cust_main->payname : '' ). qq!"></TD></TR>!.
 %      ( $conf->exists('show_bankstate') ?
 %          qq!<TR><TD ALIGN="right" WIDTH="200">$paystate_label</TD>!.
 %          qq!<TD COLSPAN="3" WIDTH="408">!.
 %          include('/elements/select-state.html',
-%                    'empty'   => '(choose)',
+%                    'empty'   => emt('(choose)'),
 %                    'state'   => $cust_main->paystate,
 %                    'country' => $cust_main->country,
 %                    'prefix'  => 'CHEK_pay',
 %       ).
 %
 %
-%        qq!<TR><TD COLSPAN=4 WIDTH="608"><INPUT TYPE="checkbox" onchange="payauto_changed(this);" NAME="CHEK_payauto" $CHEK_payauto_checked> Charge future payments to this electronic check automatically</TD></TR>!.
+%        qq!<TR><TD COLSPAN=4 WIDTH="608"><INPUT TYPE="checkbox" onchange="payauto_changed(this);" NAME="CHEK_payauto" $CHEK_payauto_checked> !.emt('Charge future payments to this electronic check automatically').qq!</TD></TR>!.
 %
 %      ( $conf->exists('cust_main-select-billday') ?
 %        qq!<TR><TD COLSPAN=2 WIDTH="608" id="chek_billday" style="display: $billday_chek_display">
 %
 %      '<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0 HEIGHT=192>'.
 %
-%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}Phone number </TD>!.
+%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt('Phone number').qq! </TD>!.
 %          qq!<TD WIDTH="408"><INPUT TYPE="text" NAME="LECB_payinfo" VALUE="!. ( $payby eq 'LECB' ? $cust_main->payinfo : '' ). qq!" MAXLENGTH=15 SIZE=16></TD></TR>!.
 %
 %        qq!<INPUT TYPE="hidden" NAME="LECB_exp_month" VALUE="12">!.
 %
 %      '<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0 HEIGHT=192>'.
 %
-%        qq!<TR><TD ALIGN="right" WIDTH="200">P.O. </TD>!.
+%        qq!<TR><TD ALIGN="right" WIDTH="200">!.emt('P.O.').qq! </TD>!.
 %          qq!<TD WIDTH="408"><INPUT TYPE="text" NAME="BILL_payinfo" VALUE="!. ( $payby eq 'BILL' ? $cust_main->payinfo : '' ). qq!"></TD></TR>!.
 %
 %        qq!<INPUT TYPE="hidden" NAME="BILL_exp_month" VALUE="12">!.
 %        qq!<INPUT TYPE="hidden" NAME="BILL_exp_year" VALUE="2037">!.
 %
-%        qq!<TR><TD ALIGN="right" WIDTH="200">Attention </TD>!.
+%        qq!<TR><TD ALIGN="right" WIDTH="200">!.emt('Attention').qq! </TD>!.
 %          qq!<TD WIDTH="408"><INPUT TYPE="text" NAME="BILL_payname" VALUE="!. encode_entities( $payby eq 'BILL' ? $cust_main->payname : '' ). qq!"></TD></TR>!.
 %
 %        '<TR><TD>&nbsp;</TD></TR>'.
 %
 %      '<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0 HEIGHT=192>'.
 %
-%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}Approved by </TD>!.
+%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt('Approved by').qq! </TD>!.
 %          qq!<TD WIDTH="408"><INPUT TYPE="text" NAME="COMP_payinfo" VALUE=""></TD></TR>!.
 %
-%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}Expiration </TD>!.
+%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt('Expiration').qq! </TD>!.
 %          '<TD WIDTH="408">'.
 %
 %          include('/elements/select-month_year.html',
 %
 %      '<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0 HEIGHT=192>'.
 %
-%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}Amount </TD>!.
+%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt('Amount').qq! </TD>!.
 %          qq!<TD WIDTH="408"><INPUT TYPE="text" NAME="CASH_paid" VALUE="!. ( $payby eq 'CASH' ? $cust_main->paid : '' ). qq!"></TD></TR>!.
 %
 %        '<TR><TD>&nbsp;</TD></TR>'.
 %
 %      '<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0 HEIGHT=192>'.
 %
-%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}Amount </TD>!.
+%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt('Amount').qq! </TD>!.
 %          qq!<TD WIDTH="408"><INPUT TYPE="text" NAME="WEST_paid" VALUE="!. ( $payby eq 'WEST' ? $cust_main->paid : '' ). qq!"></TD></TR>!.
 %
 %        '<TR><TD>&nbsp;</TD></TR>'.
 %
 %      '<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0 HEIGHT=192>'.
 %
-%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}Amount </TD>!.
+%        qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt('Amount').qq! </TD>!.
 %          qq!<TD WIDTH="408"><INPUT TYPE="text" NAME="MCRD_paid" VALUE="!. ( $payby eq 'MCRD' ? $cust_main->paid : '' ). qq!"></TD></TR>!.
 %
 %        '<TR><TD>&nbsp;</TD></TR>'.
 %  );
 
   <TD WIDTH="408">
-    <% include( '/elements/selectlayers.html',
+    <& /elements/selectlayers.html,
                   'field'      => 'payby',
                   'curr_value' => $payby2option{$payby || $payby_default || $payby[0] },
                   'options'    => \@options,
                   'labels'     => \%allopt,
                   'html_between' => '</TD></TR></TABLE>',
                   'layer_callback' => sub { my $layer = shift; $payby{$layer}; },
-              )
-    %>
+    &>
 
   <% &ntable("#cccccc") %>
 
           ? 'CHECKED'
           : ''
 
-        %>> Postal mail invoice
+        %>> <% mt('Postal mail invoice') |h %> 
 
       </TD>
     </TR>
           ? 'CHECKED'
           : ''
 
-        %>> Fax invoice
+        %>> <% mt('Fax invoice') |h %> 
 
       </TD>
     </TR>
     </TR>
 
     <TR>
-      <TD ALIGN="right" WIDTH="200">Invoice terms </TD>
+      <TD ALIGN="right" WIDTH="200"><% mt('Invoice terms') |h %> </TD>
       <TD WIDTH="408">
-        <% include('/elements/select-terms.html',
+        <& /elements/select-terms.html,
                      'curr_value' => $cust_main->invoice_terms,
-                  )
-        %>
+        &>
       </TD>
     </TR>
 
     <TR>
-      <TD ALIGN="right" WIDTH="200">Credit limit </TD>
+      <TD ALIGN="right" WIDTH="200"><% mt('Credit limit') |h %> </TD>
       <TD WIDTH="408">
         <SCRIPT TYPE="text/javascript">
 function toggle(obj) {
@@ -470,13 +466,13 @@ function toggle(obj) {
 }
         </SCRIPT>
         <INPUT TYPE="text" NAME="credit_limit" VALUE=<% sprintf('"%.2f"', $cust_main->credit_limit) %><% length($cust_main->credit_limit) ? '' : ' DISABLED' %>>
-        <INPUT TYPE="checkbox" NAME="no_credit_limit" VALUE=1 onclick="toggle(this)"<% length($cust_main->credit_limit) ? '' : ' CHECKED'%>> Unlimited
+        <INPUT TYPE="checkbox" NAME="no_credit_limit" VALUE=1 onclick="toggle(this)"<% length($cust_main->credit_limit) ? '' : ' CHECKED'%>> <% mt('Unlimited') |h %> 
       </TD>
     </TR>
 
 % if ( $conf->exists('voip-cust_cdr_spools') ) { 
       <TR>
-       <TD COLSPAN="2"><INPUT TYPE="checkbox" NAME="spool_cdr" VALUE="Y" <% $cust_main->spool_cdr eq "Y" ? 'CHECKED' : '' %>> Spool CDRs</TD>
+       <TD COLSPAN="2"><INPUT TYPE="checkbox" NAME="spool_cdr" VALUE="Y" <% $cust_main->spool_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt('Spool CDRs') |h %></TD>
       </TR>
 % } else { 
       <INPUT TYPE="hidden" NAME="spool_cdr" VALUE="<% $cust_main->spool_cdr %>">
@@ -484,7 +480,7 @@ function toggle(obj) {
 
 % if ( $conf->exists('voip-cust_cdr_squelch') ) { 
       <TR>
-       <TD COLSPAN="2"><INPUT TYPE="checkbox" NAME="squelch_cdr" VALUE="Y" <% $cust_main->squelch_cdr eq "Y" ? 'CHECKED' : '' %>> Omit CDRs from printed invoices</TD>
+       <TD COLSPAN="2"><INPUT TYPE="checkbox" NAME="squelch_cdr" VALUE="Y" <% $cust_main->squelch_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt('Omit CDRs from printed invoices') |h %></TD>
       </TR>
 % } else { 
       <INPUT TYPE="hidden" NAME="squelch_cdr" VALUE="<% $cust_main->squelch_cdr %>">
@@ -492,7 +488,7 @@ function toggle(obj) {
 
 % if ( $conf->exists('voip-cust_email_csv_cdr') ) { 
       <TR>
-       <TD COLSPAN="2"><INPUT TYPE="checkbox" NAME="email_csv_cdr" VALUE="Y" <% $cust_main->email_csv_cdr eq "Y" ? 'CHECKED' : '' %>> Attach CDRs as CSV to emailed invoices</TD>
+       <TD COLSPAN="2"><INPUT TYPE="checkbox" NAME="email_csv_cdr" VALUE="Y" <% $cust_main->email_csv_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt('Attach CDRs as CSV to emailed invoices') |h %></TD>
       </TR>
 % } else { 
       <INPUT TYPE="hidden" NAME="email_csv_cdr" VALUE="<% $cust_main->email_csv_cdr %>">
@@ -505,7 +501,7 @@ function toggle(obj) {
                    NAME="accountcode_cdr" 
                    VALUE="Y" 
                    <% $cust_main->accountcode_cdr eq "Y" ? 'CHECKED' : '' %>
-            > Breakdown CDRs by accountcode</TD>
+            > <% mt('Breakdown CDRs by accountcode') |h %></TD>
        </TR>
 % } else { 
        <INPUT TYPE="hidden" NAME="accountcode_cdr" VALUE="<% $cust_main->accountcode_cdr %>">
@@ -513,7 +509,7 @@ function toggle(obj) {
 
 % if ( $show_term || $cust_main->cdr_termination_percentage ) {
       <TR>
-       <TD ALIGN="right">CDR termination settlement</TD>
+       <TD ALIGN="right"><% mt('CDR termination settlement') |h %></TD>
        <TD><INPUT TYPE  = "text"
                   NAME  = "cdr_termination_percentage"
                   SIZE  = 6
@@ -527,7 +523,7 @@ function toggle(obj) {
 
   </TABLE>
 
-  <% $r %> required fields
+  <% $r %> <% mt('required fields') |h %> 
 % } 
 
 <%once>
index 01d024c..7adcde7 100644 (file)
@@ -1,14 +1,14 @@
 <% &ntable("#cccccc") %>
 
 <TR>
-  <TH ALIGN="right"><%$r%>Contact&nbsp;name<BR>(last,&nbsp;first)</TH>
+  <TH ALIGN="right"><%$r%><% mt('Contact name (last, first)') |h %></TH>
   <TD COLSPAN=7>
     <INPUT TYPE="text" NAME="<%$pre%>last" VALUE="<% $cust_main->get($pre.'last') |h %>" onChange="<% $onchange %>" <%$disabled%> <%$style%>> , 
     <INPUT TYPE="text" NAME="<%$pre%>first" VALUE="<% $cust_main->get($pre.'first') |h %>" onChange="<% $onchange %>" <%$disabled%> <%$style%>>
   </TD>
 % if ( $conf->exists('show_ss') && !$pre ) { 
 
-  <TD ALIGN="right">SS#</TD>
+  <TD ALIGN="right"><% mt('SS#') |h %></TD>
   <TD><INPUT TYPE="text" NAME="ss" VALUE="<% $opt{ss} %>" SIZE=11></TD>
 % } elsif ( !$pre ) { 
 
 </TR>
 
 <TR>
-  <TD ALIGN="right">Company</TD>
+  <TD ALIGN="right"><% mt('Company') |h %></TD>
   <TD COLSPAN=7>
     <INPUT TYPE="text" NAME="<%$pre%>company" VALUE="<% $cust_main->get($pre.'company') |h %>" SIZE=70 onChange="<% $onchange %>" <%$disabled%> <%$style%>>
   </TD>
 </TR>
 
-<% include('/elements/location.html',
+<& /elements/location.html,
              'prefix'       => $pre,
              'object'       => $cust_main,
              'onchange'     => $onchange,
@@ -34,8 +34,7 @@
              'same_checked' => $opt{'same_checked'},
              'geocode'      => $opt{'geocode'},
              'censustract'  => $opt{'censustract'},
-          )
-%>
+&>
 
 <TR>
   <TD ALIGN="right"><% $daytime_label %></TD>
@@ -52,7 +51,7 @@
 </TR>
 
 <TR>
-  <TD ALIGN="right">Fax</TD>
+  <TD ALIGN="right"><% mt('Fax') |h %></TD>
   <TD COLSPAN=5>
     <INPUT TYPE="text" NAME="<%$pre%>fax" VALUE="<% $cust_main->get($pre.'fax') %>" SIZE=12 onChange="<% $onchange %>" <%$disabled%> <%$style%>>
   </TD>
   <TD ALIGN="right"><% $stateid_label %></TD>
   <TD><INPUT TYPE="text" NAME="stateid" VALUE="<% $opt{stateid} %>" SIZE=12 onChange="<% $onchange %>" <%$disabled%> <%$style%>></TD>
   <TD ALIGN="right"><% $stateid_state_label %></TD>
-  <TD><% include('/elements/select-state.html',
+  <TD><& /elements/select-state.html,
                    'state'    => $cust_main->stateid_state,
                    'country'  => $cust_main->country,
                    'prefix'   => 'stateid_',
                    'onchange' => $onchange,
                    'disabled' => $disabled,
                    'style'    => \@style,
-                )
-      %>
+      &>
   </TD>
 </TR>
 % } elsif ( !$pre ) { 
 % } 
 
 </TABLE>
-<%$r%>required fields<BR>
+<%$r%><% mt('required fields') |h %><BR>
 
 <%init>
 
-#my( $cust_main, $pre, $onchange, $disabled, %opt ) = @_;
 my %opt = @_;
 my $cust_main = $opt{'cust_main'};
 my $pre       = $opt{'pre'};
@@ -94,7 +91,6 @@ my $onchange  = $opt{'onchange'};
 my $disabled  = $opt{'disabled'};
 my @style     = ( $opt{'style'} ? @{ $opt{'style'} } : () );
 
-#push @style, 'background-color: #dddddd' if $disabled;
 my $style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : '';
 
 my $conf = new FS::Conf;
@@ -123,15 +119,6 @@ if ( $conf->exists('cust_main-require_censustract') ) {
   $opt{censustract} ||= $cust_main->censustract;
 }
 
-#my($county_html, $state_html, $country_html) =
-#  FS::cust_main_county::regionselector( $cust_main->get($pre.'county'),
-#                                        $cust_main->get($pre.'state'),
-#                                        $cust_main->get($pre.'country'),
-#                                        $pre,
-#                                        $onchange,
-#                                        $disabled,
-#                                      );
-
 my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
                   ? 'Day Phone'
                   : FS::Msgcat::_gettext('daytime');
index 3b15d4e..2e9f36f 100644 (file)
@@ -7,18 +7,16 @@
 % if ( @part_pkg ) {
 
     <BR><BR>
-    <FONT SIZE="+1"><B>First package</B></FONT>
+    <FONT SIZE="+1"><B><% mt('First package') |h %></B></FONT>
     <% ntable("#cccccc") %>
 
       <TR>
         <TD COLSPAN=2>
-          <% include('first_pkg/select-part_pkg.html',
+          <& first_pkg/select-part_pkg.html,
                        'part_pkg'  => \@part_pkg,
                        'first_svc' => \@first_svc,
                        %opt,
-                       # map { $_ => $opt{$_} } qw( pkgpart_svcpart saved_domsvc )
-                    )
-          %>
+          &>
 
 % } 
 <%init>
index 9d37f15..aa3e805 100644 (file)
@@ -1,14 +1,12 @@
-<% include('/elements/xmlhttp.html',
+<& /elements/xmlhttp.html,
               'url'  => $url_prefix.'misc/svc_acct-domains.cgi',
               'subs' => [ $opt{'prefix'}. 'get_domains' ],
-           )
-%>
+&>
 
-<% include('/elements/xmlhttp.html',
+<& /elements/xmlhttp.html,
               'url'  => $url_prefix.'misc/part_svc-columns.cgi',
               'subs' => [ $opt{'prefix'}. 'get_part_svc' ],
-           )
-%>
+&>
 
 <INPUT TYPE="hidden" NAME="svcdb" VALUE="">
 
 
 </SCRIPT>
 
-<% include( '/elements/selectlayers.html',
+<& /elements/selectlayers.html,
               'field'        => $opt{'prefix'}. 'pkgpart_svcpart',
               'curr_value'   => $opt{pkgpart_svcpart},
               'options'      => \@options,
               'labels'       => \%labels,
               'html_between' => '</TD></TR></TABLE>',
-              #'onchange'     => $opt{'prefix'}. 'pkgpart_svcpart_changed(this,0);',
               'onchange'     => $opt{'prefix'}. 'pkgpart_svcpart_changed_too(what,0)',
-
               'layer_callback' => $layer_callback,
               'layermap'       => \%layermap,
-          )
-%>
+&>
 
 <SCRIPT TYPE="text/javascript">
   pkgpart_svcpart_changed_too( document.CustomerForm.pkgpart_svcpart,
@@ -156,13 +151,9 @@ my %labels = ( '' => ( $opt{'empty_label'} || '(none)' ),
 
 my $layer_callback = sub {
   my $layer = shift;
-  #$layer_fields, $layer_values, $layer_prefix
-
-#  my( $pkgpart, $svcpart ) = split('_', $layer);
-#  my $svcdb = $svcdb{$pkgpart};
   my $svcdb = $layer;
 
-  return '' unless $svcdb; #'<BR><BR><BR><BR><BR>'
+  return '' unless $svcdb; 
 
   #full path cause we're being slung around as a coderef (mason closures?)
   include("/edit/cust_main/first_pkg/$svcdb.html", %opt, );
index 150d4c0..b1ccc13 100644 (file)
@@ -1,7 +1,7 @@
 <% ntable("#cccccc") %>
 
   <TR>
-    <TD ALIGN="right">Username</TD>
+    <TD ALIGN="right"><% mt('Username') |h %></TD>
     <TD>
       <INPUT TYPE      = "text"
              NAME      = "username"
   </TR>
 
   <TR>
-    <TD ALIGN="right">Domain</TD>
+    <TD ALIGN="right"><% mt('Domain') |h %></TD>
     <TD>
       <SELECT NAME="domsvc">
-        <OPTION>(none)</OPTION>
+        <OPTION>(<% mt('none') |h %>)</OPTION>
       </SELECT>
     </TD>
   </TR>
 
   <TR>
-    <TD ALIGN="right">Password</TD>
+    <TD ALIGN="right"><% mt('Password') |h %></TD>
     <TD>
       <INPUT TYPE      = "text"
              NAME      = "_password"
@@ -37,7 +37,7 @@
 
 % if ( $opt{'password_verify'} ) {
     <TR>
-      <TD ALIGN="right">Re-enter Password</TD>
+      <TD ALIGN="right"><% mt('Re-enter Password') |h %></TD>
       <TD>
         <INPUT TYPE      = "text"
                NAME      = "_password2"
@@ -50,7 +50,7 @@
 
 % if ( $conf->exists('security_phrase') ) {
     <TR>
-      <TD ALIGN="right">Security Phrase</TD>
+      <TD ALIGN="right"><% mt('Security Phrase') |h %></TD>
       <TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="<% $opt{'sec_phrase'} %>">
       </TD>
     </TR>
@@ -62,7 +62,7 @@
     <INPUT TYPE="hidden" NAME="popnum" VALUE="">
 % } else {
     <TR>
-      <TD ALIGN="right">Access number</TD>
+      <TD ALIGN="right"><% mt('Access number') |h %></TD>
 %#           XXX should gain "area code" selection and labels on the dropdowns
       <TD><% FS::svc_acct_pop::popselector($opt{'popnum'}) %></TD>
     </TR>
 
 <%init>
 
-#use FS::svc_acct_pop;
-
 my( %opt ) = @_;
 
 my $conf = new FS::Conf;
 
-#false laziness: (mostly) copied from edit/svc_acct.cgi
-#$ulen = $svc_acct->dbdef_table->column('username')->length;
 my $ulen = dbdef->table('svc_acct')->column('username')->length;
 my $ulen2 = $ulen+2;
 my $passwordmax = $conf->config('passwordmax') || 8;
index a2381f3..229b84b 100644 (file)
@@ -1,11 +1,10 @@
 <% &ntable("#cccccc") %>
 
 %# tags
-<% include('/elements/tr-select-cust_tag.html',
+<& /elements/tr-select-cust_tag.html,
              'custnum' => $custnum,
              'cgi'     => $cgi,
-          )
-%>
+&>
 
 %# agent
 % if ( $cgi->param('lock_agentnum') =~ /^(\d+)$/ && $curuser->agentnum($1) ) {
     <INPUT TYPE="hidden" NAME="lock_agentnum" VALUE="<% $agentnum %>">
     <INPUT TYPE="hidden" NAME="agentnum"      VALUE="<% $agentnum %>">
     <TR>
-      <TD ALIGN="right">Agent</TD>
+      <TD ALIGN="right"><% mt('Agent') |h %></TD>
       <TD CLASS="fsdisabled"><% $cust_main->agent->agent |h %></TD>
     </TR>
  
 % } else {
 
-  <% include('/elements/tr-select-agent.html'
+  <& /elements/tr-select-agent.html
                 'curr_value'    => $cust_main->agentnum,
-                'label'         => "<B>${r}Agent</B>",
-                'empty_label'   => 'Select agent',
+                'label'         => "<B>${r}".emt('Agent')."</B>",
+                'empty_label'   => emt('Select agent'),
                 'disable_empty' => ( $cust_main->agentnum ? 1 : 0 ),
-                'viewall_right' => 'None', #override default 'View customers of all agents'
-             )
-  %>
+                'viewall_right' => emt('None'), 
+  &>
 
 % }
 
@@ -37,7 +35,7 @@
 % if ( $conf->exists('cust_main-edit_agent_custid') ) {
 
     <TR>
-      <TD ALIGN="right">Customer identifier</TD>
+      <TD ALIGN="right"><% mt('Customer identifier') |h %></TD>
       <TD><INPUT TYPE="text" NAME="agent_custid" VALUE="<% $cust_main->agent_custid %>"></TD>
     </TR>
 
 % }
 
 %# class
-<% include('/elements/tr-select-cust_class.html',
+<& /elements/tr-select-cust_class.html,
              'curr_value'  => $cust_main->classnum,
-             'label'       => "Class",
-             #'empty_label' => '(none)',
-             #'disable_empty' => 
-          )
-%>
+             'label'       => emt("Class"),
+&>
 
 %# referral (advertising source)
 %my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0;
 
 % } else { 
 
-   <% include('/elements/tr-select-part_referral.html',
+   <& /elements/tr-select-part_referral.html,
                 'curr_value' => $refnum
-             )
-   %>
+   &>
 % } 
 
 
@@ -80,7 +74,7 @@
 %) {
 
   <TR>
-    <TD ALIGN="right">Referring customer</TD>
+    <TD ALIGN="right"><% mt('Referring customer') |h %></TD>
     <TD>
       <A HREF="<% popurl(1) %>/cust_main.cgi?<% $cust_main->referral_custnum %>"><% $cust_main->referral_custnum %>: <% $referring_cust_main->name %></A>
     </TD>
   <TR>
     <TD ALIGN="right">Referring customer</TD>
     <TD>
-      <!-- <INPUT TYPE="text" NAME="referral_custnum" VALUE=""> -->
-      <% include('/elements/search-cust_main.html',
+      <& /elements/search-cust_main.html,
                     'field_name' => 'referral_custnum',
                     'curr_value' => $cust_main->referral_custnum,
-                 )
-      %>
+      &>
     </TD>
   </TR>
 
 
 %# signup date
 % if ( $conf->exists('cust_main-edit_signupdate') ) {
-    <% include('/elements/tr-input-date-field.html', {
+    <& /elements/tr-input-date-field.html, {
                   'name'        => 'signupdate',
                   'value'       => $cust_main->signupdate,
-                  'label'       => 'Signup date',
+                  'label'       => emt('Signup date'),
                   'format'      => ( $conf->config('date_format') || "%m/%d/%Y" ),
-              })
-    %>
+              }
+    &>
 % }
 
 </TABLE>
index 85b3008..84eaa49 100755 (executable)
@@ -1,7 +1,7 @@
-<% header("Edit Message catalog" ) %>
+<% header(emt("Edit Message catalog")) %>
 <BR>
 
-<% include('/elements/error.html') %>
+<& /elements/error.html &>
 
 <% $widget->html %>
 
@@ -20,9 +20,9 @@ my $widget = new HTML::Widgets::SelectLayers(
   'layer_callback' => sub {
     my $layer = shift;
     my $html = qq!<INPUT TYPE="hidden" NAME="locale" VALUE="$layer">!.
-               "<BR>Messages for locale $layer<BR>". table().
-               "<TR><TH COLSPAN=2>Code</TH>".
-               "<TH>Message</TH>";
+               "<BR>".emt("Messages for locale [_1]",$layer)."<BR>". table().
+               "<TR><TH COLSPAN=2>".emt('Code')."</TH>".
+               "<TH>".emt('Message')."</TH>";
     $html .= "<TH>en_US Message</TH>" unless $layer eq 'en_US';
     $html .= '</TR>';
 
@@ -44,7 +44,7 @@ my $widget = new HTML::Widgets::SelectLayers(
       $html .= '</TR>';
     }
 
-    $html .= '</TABLE><BR><INPUT TYPE="submit" VALUE="Apply changes">';
+    $html .= '</TABLE><BR><INPUT TYPE="submit" VALUE="'.emt('Apply changes').'">';
 
     $html;
   },
index dfae846..2770f32 100644 (file)
@@ -3,7 +3,7 @@
 %   $cgi->redirect(popurl(3). 'misc/change_pkg.cgi?'. $cgi->query_string );
 % } else {
 
-    <% header("Package changed") %>
+    <% header(emt("Package changed")) %>
       <SCRIPT TYPE="text/javascript">
         window.top.location.reload();
       </SCRIPT>
@@ -19,7 +19,6 @@ die "access denied"
   unless $curuser->access_right('Change customer package');
 
 my $cust_pkg = qsearchs({
-  #'select'    => 'cust_pkg.*',
   'table'     => 'cust_pkg',
   'addl_from' => 'LEFT JOIN cust_main USING ( custnum )',
   'hashref'   => { 'pkgnum' => scalar($cgi->param('pkgnum')), },
index 8715ad6..a4330dc 100755 (executable)
 %      or die "unknown custnum $custnum";
 %    $cust_main->apply_credits;
 %  }
-%  #print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum");
 %
 %  $dbh->commit or die $dbh->errstr if $oldAutoCommit;
 %  
-<% header('Credit sucessful') %>
+<% header(emt('Credit sucessful')) %>
   <SCRIPT TYPE="text/javascript">
     window.top.location.reload();
   </SCRIPT>
index 65df267..3d56a82 100755 (executable)
@@ -60,9 +60,6 @@ $cgi->param('invoicing_list', join(',', @invoicing_list) );
 my $new = new FS::cust_main ( {
   map {
     $_, scalar($cgi->param($_))
-#  } qw(custnum agentnum last first ss company address1 address2 city county
-#       state zip daytime night fax payby payinfo paydate payname tax
-#       otaker refnum)
   } fields('cust_main')
 } );
 
@@ -98,7 +95,6 @@ foreach my $dfield (qw( birthdate signupdate )) {
       if ( $dt ) {
         $parsed = $dt->epoch;
       } else {
-    #    $error ||= $cgi->param('birthdate') . " is an invalid birthdate:" . $parser->errmsg;
         $error ||= "Invalid $dfield: $value";
       }
 
@@ -162,11 +158,7 @@ if ( $new->custnum eq '' ) {
       'pkgpart'     => $pkgpart,
       'locationnum' => scalar($cgi->param('locationnum')),
     } );
-    #$error ||= $cust_pkg->check;
 
-    #$cust_svc = new FS::cust_svc ( { 'svcpart' => $svcpart } );
-
-    #$error ||= $cust_svc->check;
 
     my $part_svc = qsearchs('part_svc', { 'svcpart' => $svcpart } );
     my $svcdb = $part_svc->svcdb;
@@ -219,8 +211,6 @@ if ( $new->custnum eq '' ) {
       die "$svcdb not handled on new customer yet";
     }
 
-    #$error ||= $svc_acct->check;
-
   }
 
   use Tie::RefHash;
index d6bbf06..2c77e6b 100755 (executable)
@@ -11,7 +11,7 @@
 %  }
 %  if ( $link eq 'popup' ) {
 %    
-<% header('Payment entered') %>
+<% header(emt('Payment entered')) %>
     <SCRIPT TYPE="text/javascript">
       window.top.location.reload();
     </SCRIPT>
index 484f6fc..38f06e1 100644 (file)
@@ -2,7 +2,7 @@
 %   $cgi->param('error', $error );
 <% $cgi->redirect($p.'quick-charge.html?'. $cgi->query_string) %>
 % } else {
-<% header("One-time charge added") %>
+<% header(emt("One-time charge added")) %>
   <SCRIPT TYPE="text/javascript">
     window.top.location.reload();
   </SCRIPT>
index 4ab56e1..fab8525 100644 (file)
@@ -97,7 +97,6 @@ my $cust_pkg = new FS::cust_pkg {
                                 : ''
                             ),
    'waive_setup'         => ( $cgi->param('waive_setup') eq 'Y' ? 'Y' : '' ),
-  #'discountnum_disabled' => scalar($cgi->param('discountnum_disabled')),
 };
 
 my %opt = ( 'cust_pkg' => $cust_pkg );
index f80c829..44c23f4 100755 (executable)
@@ -1,11 +1,11 @@
-<& /elements/header.html, "$action $svc account" &>
+<& /elements/header.html, emt("$action [_1] account",$svc) &>
 
-<% include('/elements/error.html') %>
+<& /elements/error.html &>
 
 % if ( $cust_main ) { 
 
-  <% include( '/elements/small_custview.html', $cust_main, '', 1,
-              popurl(2) . "view/cust_main.cgi") %>
+  <& /elements/small_custview.html, $cust_main, '', 1,
+              popurl(2) . "view/cust_main.cgi" &>
   <BR>
 % } 
 
@@ -27,17 +27,24 @@ function randomPass() {
 <INPUT TYPE="hidden" NAME="pkgnum" VALUE="<% $pkgnum %>">
 <INPUT TYPE="hidden" NAME="svcpart" VALUE="<% $svcpart %>">
 
-Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
+% if ( $svcnum ) {
+% my $svclabel = emt("Service #[_1]",$svcnum);
+% $svclabel =~ s/$svcnum/<B>$svcnum<\/B>/;
+<% $svclabel %>
+% } else {
+<% mt("Service # (NEW)") |h %>
+% }
+<BR>
 
 <% ntable("#cccccc",2) %>
 
 <TR>
-  <TD ALIGN="right">Service</TD>
+  <TD ALIGN="right"><% mt('Service') |h %></TD>
   <TD BGCOLOR="#eeeeee"><% $part_svc->svc %></TD>
 </TR>
 
 <TR>
-  <TD ALIGN="right">Username</TD>
+  <TD ALIGN="right"><% mt('Username') |h %></TD>
   <TD>
     <INPUT TYPE="text" NAME="username" VALUE="<% $username %>" SIZE=<% $ulen2 %> MAXLENGTH=<% $ulen %>>
   </TD>
@@ -45,10 +52,10 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
 
 %if ( $part_svc->part_svc_column('_password')->columnflag ne 'F' ) {
 <TR>
-  <TD ALIGN="right">Password</TD>
+  <TD ALIGN="right"><% mt('Password') |h %></TD>
   <TD>
     <INPUT TYPE="text" NAME="clear_password" VALUE="<% $password %>" SIZE=<% $pmax2 %> MAXLENGTH=<% $pmax %>>
-    <INPUT TYPE="button" VALUE="Generate" onclick="randomPass();">
+    <INPUT TYPE="button" VALUE="<% mt('Generate') |h %>" onclick="randomPass();">
   </TD>
 </TR>
 %}else{
@@ -59,19 +66,16 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
 %my $sec_phrase = $svc_acct->sec_phrase;
 %if ( $conf->exists('security_phrase') 
 %  && $part_svc->part_svc_column('sec_phrase')->columnflag ne 'F' ) {
-%
-
 
   <TR>
-    <TD ALIGN="right">Security phrase</TD>
+    <TD ALIGN="right"><% mt('Security phrase') |h %></TD>
     <TD>
       <INPUT TYPE="text" NAME="sec_phrase" VALUE="<% $sec_phrase %>" SIZE=32>
-      (for forgotten passwords)
+      (<% mt('for forgotten passwords') |h %>)
     </TD>
   </TD>
 % } else { 
 
-
   <INPUT TYPE="hidden" NAME="sec_phrase" VALUE="<% $sec_phrase %>">
 % } 
 %
@@ -80,7 +84,6 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
 %if ( $part_svc->part_svc_column('domsvc')->columnflag eq 'F' ) {
 %
 
-
   <INPUT TYPE="hidden" NAME="domsvc" VALUE="<% $domsvc %>">
 % } else { 
 %
@@ -100,11 +103,9 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
 %                                                 'pkgnum'  => $pkgnum,
 %                                                )
 %                );
-%
-
 
   <TR>
-    <TD ALIGN="right">Domain</TD>
+    <TD ALIGN="right"><% mt('Domain') |h %></TD>
     <TD>
       <SELECT NAME="domsvc" SIZE=1>
 % foreach my $svcnum (
@@ -114,7 +115,6 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
 %             my $svc_domain = $svc_domain{$svcnum};
 %        
 
-
              <OPTION VALUE="<% $svcnum %>" <% $svcnum == $domsvc ? ' SELECTED' : '' %>><% $svc_domain{$svcnum} %>
 % } 
 
@@ -127,7 +127,7 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
 % if ( $communigate ) {
 
     <TR>
-      <TD ALIGN="right">Aliases</TD>
+      <TD ALIGN="right"><% mt('Aliases') |h %></TD>
       <TD><INPUT TYPE="text" NAME="cgp_aliases" VALUE="<% $svc_acct->cgp_aliases %>"></TD>
     </TR>
 
@@ -136,25 +136,22 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
 % }
 
 
-<% include('/elements/tr-select-svc_pbx.html',
+<& /elements/tr-select-svc_pbx.html,
              'curr_value' => $svc_acct->pbxsvc,
              'part_svc'   => $part_svc,
              'cust_pkg'   => $cust_pkg,
-          )
-%>
+&>
 
 %#pop
 %my $popnum = $svc_acct->popnum || 0;
 %if ( $part_svc->part_svc_column('popnum')->columnflag eq 'F' ) {
 %
 
-
   <INPUT TYPE="hidden" NAME="popnum" VALUE="<% $popnum %>">
 % } else { 
 
-
   <TR>
-    <TD ALIGN="right">Access number</TD>
+    <TD ALIGN="right"><% mt('Access number') |h %></TD>
     <TD><% FS::svc_acct_pop::popselector($popnum) %></TD>
   </TR>
 % } 
@@ -167,7 +164,6 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
 %  
 % if ( length($svc_acct->$xid()) ) { 
 
-  
       <TR>
         <TD ALIGN="right"><% uc($xid) %></TD>
           <TD BGCOLOR="#eeeeee"><% $svc_acct->$xid() %></TD>
@@ -175,11 +171,9 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
         </TD>
       </TR>
 % } 
-
   
     <INPUT TYPE="hidden" NAME="<% $xid %>" VALUE="<% $svc_acct->$xid() %>">
 % } else { 
-
   
     <TR>
       <TD ALIGN="right"><% uc($xid) %></TD>
@@ -195,13 +189,12 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
 %     && ! $svc_acct->finger ) { 
 %
 
-
   <INPUT TYPE="hidden" NAME="finger" VALUE="">
 % } else { 
 
 
   <TR>
-    <TD ALIGN="right">Real Name</TD>
+    <TD ALIGN="right"><% mt('Real Name') |h %></TD>
     <TD>
       <INPUT TYPE="text" NAME="finger" VALUE="<% $svc_acct->finger %>">
     </TD>
@@ -219,7 +212,7 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
 
 
   <TR>
-    <TD ALIGN="right">Home directory</TD>
+    <TD ALIGN="right"><% mt('Home directory') |h %></TD>
     <TD><INPUT TYPE="text" NAME="dir" VALUE="<% $svc_acct->dir %>"></TD>
   </TR>
 % } 
@@ -231,13 +224,12 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
 %   ) {
 %
 
-
   <INPUT TYPE="hidden" NAME="shell" VALUE="<% $shell %>">
 % } else { 
 
 
   <TR>
-    <TD ALIGN="right">Shell</TD>
+    <TD ALIGN="right"><% mt('Shell') |h %></TD>
     <TD>
       <SELECT NAME="shell" SIZE=1>
 %
@@ -245,7 +237,6 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
 %           foreach $etc_shell (@shells) {
 %        
 
-
           <OPTION<% $etc_shell eq $shell ? ' SELECTED' : '' %>><% $etc_shell %>
 % } 
 
@@ -255,18 +246,17 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
   </TR>
 % } 
 
-<% include('svc_acct/communigate.html',
+<& svc_acct/communigate.html,
              'svc_acct'    => $svc_acct,
              'part_svc'    => $part_svc,
              'communigate' => $communigate,
-          )
-%>
+&>
 
 % if ( $part_svc->part_svc_column('slipip')->columnflag =~ /^[FA]$/ ) { 
   <INPUT TYPE="hidden" NAME="slipip" VALUE="<% $svc_acct->slipip %>">
 % } else { 
   <TR>
-    <TD ALIGN="right">IP</TD>
+    <TD ALIGN="right"><% mt('IP') |h %></TD>
     <TD><INPUT TYPE="text" NAME="slipip" VALUE="<% $svc_acct->slipip %>"></TD>
   </TR>
 % } 
@@ -280,12 +270,12 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
 %   my $tf = $uf . "_threshold";
 %   if ( $curuser->access_right('Edit usage') ) { 
   <TR>
-    <TD ALIGN="right"><% $label{$uf} %> remaining</TD>
-    <TD><INPUT TYPE="text" NAME="<% $uf %>" VALUE="<% $svc_acct->$uf %>">(blank disables)</TD>
+    <TD ALIGN="right"><% mt("[_1] remaining",$label{$uf}) |h %> </TD>
+    <TD><INPUT TYPE="text" NAME="<% $uf %>" VALUE="<% $svc_acct->$uf %>">(<% mt('blank disables') |h %>)</TD>
   </TR>
   <TR>
-    <TD ALIGN="right"><% $label{$uf} %> threshold</TD>
-    <TD><INPUT TYPE="text" NAME="<% $tf %>" VALUE="<% $svc_acct->$tf %>">(blank disables)</TD>
+    <TD ALIGN="right"><% mt("[_1] threshold",$label{$uf}) |h %> </TD>
+    <TD><INPUT TYPE="text" NAME="<% $tf %>" VALUE="<% $svc_acct->$tf %>">(<% mt('blank disables') |h %>)</TD>
   </TR>
 %   }else{
       <INPUT TYPE="hidden" NAME="<% $uf %>" VALUE="<% $svc_acct->$uf %>">
@@ -299,11 +289,9 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
 %
 % if ( $part_svc->part_svc_column($r)->columnflag =~ /^[FA]$/ ) { 
 
-
     <INPUT TYPE="hidden" NAME="<% $r %>" VALUE="<% $svc_acct->getfield($r) %>">
 % } else { 
 
-
     <TR>
       <TD ALIGN="right"><% $FS::raddb::attrib{$a} %></TD>
       <TD><INPUT TYPE="text" NAME="<% $r %>" VALUE="<% $svc_acct->getfield($r) %>"></TD>
@@ -312,37 +300,31 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
 % } 
 
 
-
 <TR>
-  <TD ALIGN="right">RADIUS groups</TD>
+  <TD ALIGN="right"><% mt('RADIUS groups') |h %></TD>
 % if ( $part_svc->part_svc_column('usergroup')->columnflag eq 'F' ) { 
 
-
     <TD BGCOLOR="#eeeeee"><% join('<BR>', @groups) %></TD>
 % } else { 
 
-
     <TD><% FS::svc_acct::radius_usergroup_selector( \@groups ) %></TD>
 % } 
 
-
 </TR>
 % foreach my $field ($svc_acct->virtual_fields) { 
 % # If the flag is X, it won't even show up in $svc_acct->virtual_fields. 
 % if ( $part_svc->part_svc_column($field)->columnflag ne 'F' ) { 
 
-
     <% $svc_acct->pvf($field)->widget('HTML', 'edit', $svc_acct->getfield($field)) %>
 % } 
 % } 
-
   
 </TABLE>
 <BR>
 
 % if ( $captcha_url ) {
 <IMG SRC="<% $captcha_url %>"><BR>
-Enter the word shown above: <INPUT TYPE="text" NAME="captcha_response"><BR>
+<% mt('Enter the word shown above:') |h %> <INPUT TYPE="text" NAME="captcha_response"><BR>
 <BR>
 % }
 
@@ -350,7 +332,7 @@ Enter the word shown above: <INPUT TYPE="text" NAME="captcha_response"><BR>
 
 </FORM>
 
-<% include('/elements/footer.html') %>
+<& /elements/footer.html &>
 
 <%init>