[freeside-commits] freeside/httemplate/search cust_main.cgi, 1.84, 1.85 report_cust_refund.html, 1.5, 1.6 report_receivables.cgi, 1.53, 1.54 report_svc_acct.html, 1.8, 1.9
Erik Levinson
levinse at wavetail.420.am
Sat May 21 10:58:10 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv5783/search
Modified Files:
cust_main.cgi report_cust_refund.html report_receivables.cgi
report_svc_acct.html
Log Message:
internationalization/localization, RT12515
Index: report_cust_refund.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_cust_refund.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- report_cust_refund.html 15 Aug 2010 06:21:06 -0000 1.5
+++ report_cust_refund.html 21 May 2011 17:58:08 -0000 1.6
@@ -1,5 +1,4 @@
-<% include( 'elements/report_cust_pay_or_refund.html',
+<& elements/report_cust_pay_or_refund.html,
'thing' => 'refund',
- 'name_singular' => 'refund',
- )
-%>
+ 'name_singular' => emt('refund'),
+&>
Index: cust_main.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_main.cgi,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -w -d -r1.84 -r1.85
--- cust_main.cgi 4 May 2011 05:44:27 -0000 1.84
+++ cust_main.cgi 21 May 2011 17:58:07 -0000 1.85
@@ -1,263 +1,17 @@
-%my $curuser = $FS::CurrentUser::CurrentUser;
-%
-%die "access denied"
-% unless $curuser->access_right('List customers');
-%
-%my $conf = new FS::Conf;
-%my $maxrecords = $conf->config('maxsearchrecordsperpage');
-%
-%#my $cache;
-%
-%#my $monsterjoin = <<END;
[...1170 lines suppressed...]
+ $phone = "$1-$2";
+ } elsif ( $phone =~ /^(\d{3,4})$/ ) {
+ $phone = $1;
+ } else {
+ errorpage(gettext('illegal_phone'). ": $phone");
+ }
+
+ my @fields = qw(daytime night fax);
+ push @fields, qw(ship_daytime ship_night ship_fax)
+ if defined dbdef->table('cust_main')->column('ship_last');
+
+ for my $field ( @fields ) {
+ push @cust_main, qsearch ( 'cust_main',
+ { $field => { 'op' => 'LIKE',
+ 'value' => "%$phone%" } } );
+ }
+
+ \@cust_main;
+}
+</%init>
Index: report_receivables.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_receivables.cgi,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -w -d -r1.53 -r1.54
--- report_receivables.cgi 22 Jul 2010 07:25:35 -0000 1.53
+++ report_receivables.cgi 21 May 2011 17:58:08 -0000 1.54
@@ -1,9 +1,8 @@
-<% include( 'elements/cust_main_dayranges.html',
- 'title' => 'Accounts Receivable Aging Summary',
+<& elements/cust_main_dayranges.html,
+ 'title' => emt('Accounts Receivable Aging Summary'),
'range_sub' => \&balance,
'payment_links' => 1,
- )
-%>
+&>
<%init>
die "access denied"
Index: report_svc_acct.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_svc_acct.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -d -r1.8 -r1.9
--- report_svc_acct.html 20 May 2010 08:48:51 -0000 1.8
+++ report_svc_acct.html 21 May 2011 17:58:08 -0000 1.9
@@ -1,4 +1,4 @@
-<% include('/elements/header.html', $title ) %>
+<& /elements/header.html, $title &>
<FORM ACTION="svc_acct.cgi" METHOD="GET">
<INPUT TYPE="hidden" NAME="magic" VALUE="advanced">
@@ -7,23 +7,21 @@
<TABLE BGCOLOR="#cccccc" CELLSPACING=0>
<TR>
- <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Search options</FONT></TH>
+ <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Search options') |h %></FONT></TH>
</TR>
% 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">
@@ -55,61 +53,60 @@
</TD>
<TD>
<INPUT NAME="<% $invert %>" ID="<% $invert %>" TYPE="hidden">
- <A HREF="javascript:void(0)" onClick="toggle('<% $field %>'); return false;">Invert</A>
+ <A HREF="javascript:void(0)" onClick="toggle('<% $field %>'); return false;"><% mt('Invert') |h %></A>
</TD>
</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 &>
<TR>
<TH CLASS="background" COLSPAN=2> </TH>
</TR>
<TR>
- <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
+ <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Display options') |h %></FONT></TH>
</TR>
% #move to /elements/tr-select-cust_pkg-fields if anything else needs it...
<TR>
- <TD ALIGN="right">Package fields</TD>
+ <TD ALIGN="right"><% mt('Package fields') |h %></TD>
<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'); #?
-my $title = 'Account Report';
+my $title = emt('Account Report');
#false laziness w/report_cust_pkg.html
my $custnum = '';
@@ -120,7 +117,7 @@
'hashref' => { 'custnum' => $custnum },
'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
}) or die "unknown custnum $custnum";
- $title .= ': '. $cust_main->name;
+ $title = emt("Account Report: [_1]", $cust_main->name);
}
</%init>
More information about the freeside-commits
mailing list