From b5dbd9e1bcbb701a20ed23e723b1e0105fd7c1a1 Mon Sep 17 00:00:00 2001 From: levinse Date: Mon, 23 May 2011 16:25:27 +0000 Subject: [PATCH] internationalization/localization, RT12515 --- httemplate/edit/cust_bill_pay.cgi | 9 +-- httemplate/edit/cust_credit.cgi | 30 +++----- httemplate/edit/cust_main.cgi | 44 +++++------ httemplate/edit/cust_main/billing.html | 86 ++++++++++----------- httemplate/edit/cust_main/contact.html | 31 +++----- httemplate/edit/cust_main/first_pkg.html | 8 +- .../edit/cust_main/first_pkg/select-part_pkg.html | 23 ++---- httemplate/edit/cust_main/first_pkg/svc_acct.html | 18 ++--- httemplate/edit/cust_main/top_misc.html | 50 +++++------- httemplate/edit/msgcat.cgi | 12 +-- httemplate/edit/process/change-cust_pkg.html | 3 +- httemplate/edit/process/cust_credit.cgi | 3 +- httemplate/edit/process/cust_main.cgi | 10 --- httemplate/edit/process/cust_pay.cgi | 2 +- httemplate/edit/process/quick-charge.cgi | 2 +- httemplate/edit/process/quick-cust_pkg.cgi | 1 - httemplate/edit/svc_acct.cgi | 90 +++++++++------------- 17 files changed, 169 insertions(+), 253 deletions(-) diff --git a/httemplate/edit/cust_bill_pay.cgi b/httemplate/edit/cust_bill_pay.cgi index 532db6a6e..f620fc57a 100755 --- a/httemplate/edit/cust_bill_pay.cgi +++ b/httemplate/edit/cust_bill_pay.cgi @@ -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" diff --git a/httemplate/edit/cust_credit.cgi b/httemplate/edit/cust_credit.cgi index d5e53b8f1..068144547 100755 --- a/httemplate/edit/cust_credit.cgi +++ b/httemplate/edit/cust_credit.cgi @@ -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 &>
@@ -13,29 +13,24 @@ <% ntable("#cccccc", 2) %> - Date + <% mt('Date') |h %> <% time2str($date_format, $_date) %> - Amount + <% mt('Amount') |h %> $ -% -%#print qq! 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, - ) -%> +&> - Additional info + <% mt('Additional info') |h %> @@ -44,17 +39,16 @@ % } else { - Auto-apply
to invoices - + <% mt('Auto-apply to invoices') |h %> + % } % 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 { % } @@ -63,7 +57,7 @@
-
+
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 61d92b998..1c188dc14 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -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 &>
> @@ -25,12 +23,12 @@ % } %# 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') ) {
- <% include('cust_main/birthdate.html', $cust_main) %> + <& cust_main/birthdate.html, $cust_main &> % } %# latitude and longitude @@ -62,7 +60,7 @@
Billing address -<% 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 - ) -%> +&>
-Service address +<% mt('Service address') |h %> -(>same as billing address) -<% include('cust_main/contact.html', +(><% 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) { -
Comments +
<% mt('Comments') |h %> <% &ntable("#cccccc") %> @@ -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) { % } -<% include('cust_main/bottomfixup.html') %> +<& cust_main/bottomfixup.html &>
-<% 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!* !; diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index 7c053dcfb..07266b9a6 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -1,5 +1,4 @@ %if ( $payby_default eq 'HIDE' ) { -% % $cust_main->payby('BILL') unless $cust_main->payby; % my $payby = $cust_main->payby; @@ -35,11 +34,11 @@ % % my $r = qq!* !; -
Billing information +
<% mt('Billing information') |h %> <% &ntable("#cccccc") %> - <%$r%>Billing type + <%$r%><% mt('Billing type') |h %> - <% include('/elements/init_overlib.html') %> + <& /elements/init_overlib.html &> % my $payby = $cust_main->payby; % my $paytype = $cust_main->paytype; @@ -147,10 +146,10 @@ % % ''. % -% qq!!. +% qq!!. % qq!!. % -% qq!!. +% qq!!. % ''. % -% qq!!. % '!. +% qq!!. % '!. % -% qq!!. +% qq!!. % qq!!. % -% qq!!. +% qq!!. % % ( $conf->exists('cust_main-select-billday') ? % qq! - + - + @@ -45,10 +52,10 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
%if ( $part_svc->part_svc_column('_password')->columnflag ne 'F' ) { - + %}else{ @@ -59,19 +66,16 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
%my $sec_phrase = $svc_acct->sec_phrase; %if ( $conf->exists('security_phrase') % && $part_svc->part_svc_column('sec_phrase')->columnflag ne 'F' ) { -% - - + % } else { - % } % @@ -80,7 +84,6 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
%if ( $part_svc->part_svc_column('domsvc')->columnflag eq 'F' ) { % - % } else { % @@ -100,11 +103,9 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
% 'pkgnum' => $pkgnum, % ) % ); -% - - + - + @@ -136,25 +136,22 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
% } -<% 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' ) { % - % } else { - - + % } @@ -167,7 +164,6 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
% % if ( length($svc_acct->$xid()) ) { - @@ -175,11 +171,9 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
% } - % } else { - @@ -195,13 +189,12 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
% && ! $svc_acct->finger ) { % - % } else { - + @@ -219,7 +212,7 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
- + % } @@ -231,13 +224,12 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
% ) { % - % } else { - + % } -<% 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]$/ ) { % } else { - + % } @@ -280,12 +270,12 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
% my $tf = $uf . "_threshold"; % if ( $curuser->access_right('Edit usage') ) { - - + + - - + + % }else{ @@ -299,11 +289,9 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
% % if ( $part_svc->part_svc_column($r)->columnflag =~ /^[FA]$/ ) { - % } else { - @@ -312,37 +300,31 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
% } - - + % if ( $part_svc->part_svc_column('usergroup')->columnflag eq 'F' ) { - % } else { - % } - % 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)) %> % } % } -
${r}Card number
${r}!.emt('Card number').qq!
${r}Expiration
${r}!.emt('Expiration').qq! '. % % include('/elements/select-month_year.html', @@ -161,14 +160,13 @@ % % '
CVV2 !. +% qq!
!.emt('CVV2').qq! !. % -% qq!(help)!. +% qq!(!.emt('help').qq!)!. % qq!'. % -% -% qq!
Start date
!.emt('Start date').qq! '. % % include('/elements/select-month_year.html', @@ -186,13 +184,13 @@ % ) % ). % -% qq! or Issue number !. +% qq!!.emt('or Issue number').qq! !. % '
${r}Exact name on card
${r}!.emt('Exact name on card').qq!
Charge future payments to this card automatically
!.emt('Charge future payments to this card automatically').qq!
@@ -207,27 +205,27 @@ % % ''. % -% qq!!. +% qq!!. % qq!'. -% qq!!. % -% qq!!. +% qq!!. % qq!!. % % qq!!. % qq!!. % -% qq!!. +% qq!!. % qq!!. % ( $conf->exists('show_bankstate') ? % qq!!. % qq!!. +% qq!!. % % ( $conf->exists('cust_main-select-billday') ? % qq!
${r}Account number
${r}!.emt('Account number').qq! Type!.emt('Type').qq!
${r}ABA/Routing number
${r}!.emt('ABA/Routing number').qq! !. -% qq!(help)!. +% qq!(!.emt('help').qq!)!. % qq!
${r}Bank name
${r}!.emt('Bank name').qq!
$paystate_label!. % include('/elements/select-state.html', -% 'empty' => '(choose)', +% 'empty' => emt('(choose)'), % 'state' => $cust_main->paystate, % 'country' => $cust_main->country, % 'prefix' => 'CHEK_pay', @@ -237,7 +235,7 @@ % ). % % -% qq!
Charge future payments to this electronic check automatically
!.emt('Charge future payments to this electronic check automatically').qq!
@@ -256,7 +254,7 @@ % % ''. % -% qq!!. +% qq!!. % qq!!. % % qq!!. @@ -276,13 +274,13 @@ % % '
${r}Phone number
${r}!.emt('Phone number').qq!
'. % -% qq!!. +% qq!!. % qq!!. % % qq!!. % qq!!. % -% qq!!. +% qq!!. % qq!!. % % ''. @@ -297,10 +295,10 @@ % % '
P.O.
!.emt('P.O.').qq!
Attention
!.emt('Attention').qq!
 
'. % -% qq!!. +% qq!!. % qq!!. % -% qq!!. +% qq!!. % ' @@ -437,7 +434,7 @@ ? 'CHECKED' : '' - %>> Fax invoice + %>> <% mt('Fax invoice') |h %> @@ -452,17 +449,16 @@ - + - + % if ( $conf->exists('voip-cust_cdr_spools') ) { - + % } else { @@ -484,7 +480,7 @@ function toggle(obj) { % if ( $conf->exists('voip-cust_cdr_squelch') ) { - + % } else { @@ -492,7 +488,7 @@ function toggle(obj) { % if ( $conf->exists('voip-cust_email_csv_cdr') ) { - + % } else { @@ -505,7 +501,7 @@ function toggle(obj) { NAME="accountcode_cdr" VALUE="Y" <% $cust_main->accountcode_cdr eq "Y" ? 'CHECKED' : '' %> - > Breakdown CDRs by accountcode + > <% mt('Breakdown CDRs by accountcode') |h %> % } else { @@ -513,7 +509,7 @@ function toggle(obj) { % if ( $show_term || $cust_main->cdr_termination_percentage ) { - + - + % if ( $conf->exists('show_ss') && !$pre ) { - + % } elsif ( !$pre ) { @@ -19,13 +19,13 @@ - + -<% 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'}, - ) -%> +&> @@ -52,7 +51,7 @@ - + @@ -64,15 +63,14 @@ - % } elsif ( !$pre ) { @@ -82,11 +80,10 @@ % }
${r}Approved by
${r}!.emt('Approved by').qq!
${r}Expiration
${r}!.emt('Expiration').qq! '. % % include('/elements/select-month_year.html', @@ -323,7 +321,7 @@ % % ''. % -% qq!!. +% qq!!. % qq!!. % % ''. @@ -339,7 +337,7 @@ % % '
${r}Amount
${r}!.emt('Amount').qq!
 
'. % -% qq!!. +% qq!!. % qq!!. % % ''. @@ -355,7 +353,7 @@ % % '
${r}Amount
${r}!.emt('Amount').qq!
 
'. % -% qq!!. +% qq!!. % qq!!. % % ''. @@ -388,15 +386,14 @@ % );
${r}Amount
${r}!.emt('Amount').qq!
 
- <% include( '/elements/selectlayers.html', + <& /elements/selectlayers.html, 'field' => 'payby', 'curr_value' => $payby2option{$payby || $payby_default || $payby[0] }, 'options' => \@options, 'labels' => \%allopt, 'html_between' => '
', 'layer_callback' => sub { my $layer = shift; $payby{$layer}; }, - ) - %> + &> <% &ntable("#cccccc") %> @@ -425,7 +422,7 @@ ? 'CHECKED' : '' - %>> Postal mail invoice + %>> <% mt('Postal mail invoice') |h %>
Invoice terms <% mt('Invoice terms') |h %> - <% include('/elements/select-terms.html', + <& /elements/select-terms.html, 'curr_value' => $cust_main->invoice_terms, - ) - %> + &>
Credit limit <% mt('Credit limit') |h %> credit_limit) %><% length($cust_main->credit_limit) ? '' : ' DISABLED' %>> - credit_limit) ? '' : ' CHECKED'%>> Unlimited + credit_limit) ? '' : ' CHECKED'%>> <% mt('Unlimited') |h %>
spool_cdr eq "Y" ? 'CHECKED' : '' %>> Spool CDRsspool_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt('Spool CDRs') |h %>
squelch_cdr eq "Y" ? 'CHECKED' : '' %>> Omit CDRs from printed invoicessquelch_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt('Omit CDRs from printed invoices') |h %>
email_csv_cdr eq "Y" ? 'CHECKED' : '' %>> Attach CDRs as CSV to emailed invoicesemail_csv_cdr eq "Y" ? 'CHECKED' : '' %>> <% mt('Attach CDRs as CSV to emailed invoices') |h %>
CDR termination settlement<% mt('CDR termination settlement') |h %> - <% $r %> required fields + <% $r %> <% mt('required fields') |h %> % } <%once> diff --git a/httemplate/edit/cust_main/contact.html b/httemplate/edit/cust_main/contact.html index 01d024ca2..7adcde77f 100644 --- a/httemplate/edit/cust_main/contact.html +++ b/httemplate/edit/cust_main/contact.html @@ -1,14 +1,14 @@ <% &ntable("#cccccc") %>
<%$r%>Contact name
(last, first)
<%$r%><% mt('Contact name (last, first)') |h %> <%$style%>> , <%$style%>> SS#<% mt('SS#') |h %>
Company<% mt('Company') |h %> <%$style%>>
<% $daytime_label %>
Fax<% mt('Fax') |h %> <%$style%>> <% $stateid_label %> <%$style%>> <% $stateid_state_label %><% include('/elements/select-state.html', + <& /elements/select-state.html, 'state' => $cust_main->stateid_state, 'country' => $cust_main->country, 'prefix' => 'stateid_', 'onchange' => $onchange, 'disabled' => $disabled, 'style' => \@style, - ) - %> + &>
-<%$r%>required fields
+<%$r%><% mt('required fields') |h %>
<%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'); diff --git a/httemplate/edit/cust_main/first_pkg.html b/httemplate/edit/cust_main/first_pkg.html index 3b15d4ee4..2e9f36f99 100644 --- a/httemplate/edit/cust_main/first_pkg.html +++ b/httemplate/edit/cust_main/first_pkg.html @@ -7,18 +7,16 @@ % if ( @part_pkg ) {

- First package + <% mt('First package') |h %> <% ntable("#cccccc") %>
- <% 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> diff --git a/httemplate/edit/cust_main/first_pkg/select-part_pkg.html b/httemplate/edit/cust_main/first_pkg/select-part_pkg.html index 9d37f15eb..aa3e805a2 100644 --- a/httemplate/edit/cust_main/first_pkg/select-part_pkg.html +++ b/httemplate/edit/cust_main/first_pkg/select-part_pkg.html @@ -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' ], - ) -%> +&> @@ -101,19 +99,16 @@ -<% include( '/elements/selectlayers.html', +<& /elements/selectlayers.html, 'field' => $opt{'prefix'}. 'pkgpart_svcpart', 'curr_value' => $opt{pkgpart_svcpart}, 'options' => \@options, 'labels' => \%labels, 'html_between' => '
', - #'onchange' => $opt{'prefix'}. 'pkgpart_svcpart_changed(this,0);', 'onchange' => $opt{'prefix'}. 'pkgpart_svcpart_changed_too(what,0)', - 'layer_callback' => $layer_callback, 'layermap' => \%layermap, - ) -%> +&> @@ -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')), }, diff --git a/httemplate/edit/process/cust_credit.cgi b/httemplate/edit/process/cust_credit.cgi index 8715ad61e..a4330dcdd 100755 --- a/httemplate/edit/process/cust_credit.cgi +++ b/httemplate/edit/process/cust_credit.cgi @@ -12,11 +12,10 @@ % 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')) %> diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 65df2671e..3d56a8255 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -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; diff --git a/httemplate/edit/process/cust_pay.cgi b/httemplate/edit/process/cust_pay.cgi index d6bbf06b0..2c77e6b57 100755 --- a/httemplate/edit/process/cust_pay.cgi +++ b/httemplate/edit/process/cust_pay.cgi @@ -11,7 +11,7 @@ % } % if ( $link eq 'popup' ) { % -<% header('Payment entered') %> +<% header(emt('Payment entered')) %> diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index 484f6fcc6..38f06e1e9 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -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")) %> diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index 4ab56e19a..fab85252b 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -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 ); diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi index f80c82998..44c23f4d2 100755 --- a/httemplate/edit/svc_acct.cgi +++ b/httemplate/edit/svc_acct.cgi @@ -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" &>
% } @@ -27,17 +27,24 @@ function randomPass() { -Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
+% if ( $svcnum ) { +% my $svclabel = emt("Service #[_1]",$svcnum); +% $svclabel =~ s/$svcnum/$svcnum<\/B>/; +<% $svclabel %> +% } else { +<% mt("Service # (NEW)") |h %> +% } +
<% ntable("#cccccc",2) %>
Service<% mt('Service') |h %> <% $part_svc->svc %>
Username<% mt('Username') |h %> MAXLENGTH=<% $ulen %>>
Password<% mt('Password') |h %> MAXLENGTH=<% $pmax %>> - +
Security phrase<% mt('Security phrase') |h %> - (for forgotten passwords) + (<% mt('for forgotten passwords') |h %>)
Domain<% mt('Domain') |h %>
Aliases<% mt('Aliases') |h %>
Access number<% mt('Access number') |h %> <% FS::svc_acct_pop::popselector($popnum) %>
<% uc($xid) %> <% $svc_acct->$xid() %>
<% uc($xid) %>
Real Name<% mt('Real Name') |h %>
Home directory<% mt('Home directory') |h %>
Shell<% mt('Shell') |h %>
IP<% mt('IP') |h %>
<% $label{$uf} %> remaining(blank disables)<% mt("[_1] remaining",$label{$uf}) |h %> (<% mt('blank disables') |h %>)
<% $label{$uf} %> threshold(blank disables)<% mt("[_1] threshold",$label{$uf}) |h %> (<% mt('blank disables') |h %>)
<% $FS::raddb::attrib{$a} %>
RADIUS groups<% mt('RADIUS groups') |h %><% join('
', @groups) %>
<% FS::svc_acct::radius_usergroup_selector( \@groups ) %>

% if ( $captcha_url ) {
-Enter the word shown above:
+<% mt('Enter the word shown above:') |h %>

% } @@ -350,7 +332,7 @@ Enter the word shown above:
-<% include('/elements/footer.html') %> +<& /elements/footer.html &> <%init> -- 2.11.0