summaryrefslogtreecommitdiff
path: root/httemplate/search/elements
diff options
context:
space:
mode:
authorlevinse <levinse>2011-05-21 18:24:20 +0000
committerlevinse <levinse>2011-05-21 18:24:20 +0000
commit2db5d3e1c4d5a48ad15b59efd2f66957937421aa (patch)
tree69922bb7273212dd4c7aa6fd806732cc1c4f5b14 /httemplate/search/elements
parentddde2be8e3d2cd0e61da2f68d4c06a6b31c50562 (diff)
internationalization/localization, RT12515
Diffstat (limited to 'httemplate/search/elements')
-rw-r--r--httemplate/search/elements/cust_main_dayranges.html14
-rwxr-xr-xhttemplate/search/elements/cust_pay_or_refund.html15
-rw-r--r--httemplate/search/elements/report_cust_pay_or_refund.html75
3 files changed, 46 insertions, 58 deletions
diff --git a/httemplate/search/elements/cust_main_dayranges.html b/httemplate/search/elements/cust_main_dayranges.html
index 91e039d28..cc1601455 100644
--- a/httemplate/search/elements/cust_main_dayranges.html
+++ b/httemplate/search/elements/cust_main_dayranges.html
@@ -15,7 +15,7 @@ Example:
};
</%doc>
-<% include( 'search.html',
+<& search.html,
'name' => 'customers',
'query' => $sql_query,
'count_query' => $count_sql,
@@ -25,7 +25,7 @@ Example:
'30-60',
'60-90',
'90+',
- 'Total',
+ emt('Total'),
@pay_head,
],
'footer' => [
@@ -68,12 +68,9 @@ Example:
'',
@pay_links,
],
- #'align' => 'rlccrrrrr',
'align' => FS::UI::Web::cust_aligns().
'rrrrr'.
('c' x @pay_labels),
- #'size' => [ '', '', '-1', '-1', '', '', '', '', '', ],
- #'style' => [ '', '', 'b', 'b', '', '', '', '', 'b', ],
'size' => [ ( map '', FS::UI::Web::cust_header() ),
#'-1', '', '', '', '', '', ],
'', '', '', '', '', '',
@@ -95,8 +92,7 @@ Example:
( map '', @pay_labels ),
],
%opt,
- )
-%>
+&>
<%init>
my %opt = @_;
@@ -118,7 +114,6 @@ if($cgi->param('as_of')) {
$opt{'title'} .= ' ('.$cgi->param('as_of').')' if $offset > 0;
}
-#my $range_cols = join(',', map &{$range_sub}( @$_ ), @ranges );
my $range_cols = join(',', map call_range_sub($range_sub, @$_, 'offset' => $offset ), @$ranges );
my $select_count_pkgs = FS::cust_main->select_count_pkgs_sql;
@@ -163,7 +158,6 @@ if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
#prospect active inactive suspended cancelled
if ( grep { $cgi->param('status') eq $_ } FS::cust_main->statuses() ) {
my $method = $cgi->param('status'). '_sql';
- #push @where, $class->$method();
push @where, FS::cust_main->$method();
}
@@ -222,7 +216,7 @@ if($opt{'payment_links'} && $curuser->access_right('Process payment') && @payby)
@pay_labels = (map { my $payby = $_;
my $label = $label{$payby};
- sub {($payby eq $_[0]->payby) ? "<b>$label (on file)</b>" : $label}
+ sub {($payby eq $_[0]->payby) ? "<b>".emt("$label (on file)")."</b>" : emt($label)}
} @payby );
@pay_links = (map { [ "${p}misc/payment.cgi?payby=$_;custnum=", 'custnum' ] }
diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html
index fccb9eef7..8c32b79bd 100755
--- a/httemplate/search/elements/cust_pay_or_refund.html
+++ b/httemplate/search/elements/cust_pay_or_refund.html
@@ -39,8 +39,8 @@ Examples:
)
</%doc>
-<% include( 'search.html',
- 'title' => $title,
+<& search.html,
+ 'title' => $title, # XXX: translate
'name_singular' => $name_singular,
'query' => $sql_query,
'count_query' => $count_query,
@@ -53,8 +53,7 @@ Examples:
'links' => \@links,
'color' => \@color,
'style' => \@style,
- )
-%>
+&>
<%init>
my %opt = @_;
@@ -158,21 +157,21 @@ push @fields, 'payby_payinfo_pretty',
push @sort_fields, '', $amount_field;
if ( $unapplied ) {
- push @header, 'Unapplied';
+ push @header, emt('Unapplied');
$align .= 'r';
push @links, '';
push @fields, sub { sprintf('$%.2f', shift->unapplied_amount) };
push @sort_fields, '';
}
-push @header, 'Date';
+push @header, emt('Date');
$align .= 'r';
push @links, '';
push @fields, sub { time2str('%b %d %Y', shift->_date ) };
push @sort_fields, '_date';
unless ( $opt{'disable_by'} ) {
- push @header, 'By';
+ push @header, emt('By');
$align .= 'c';
push @links, '';
push @fields, sub { my $o = shift->otaker;
@@ -183,7 +182,7 @@ unless ( $opt{'disable_by'} ) {
}
if ( $tax_names ) {
- push @header, ('Tax names', 'Tax province');
+ push @header, (emt('Tax names'), emt('Tax province'));
$align .= 'cc';
push @links, ('','');
push @fields, sub { join (' + ', map { /^(.*?)(, \w\w)?$/; $1 }
diff --git a/httemplate/search/elements/report_cust_pay_or_refund.html b/httemplate/search/elements/report_cust_pay_or_refund.html
index 9af4e33dc..ac63935a5 100644
--- a/httemplate/search/elements/report_cust_pay_or_refund.html
+++ b/httemplate/search/elements/report_cust_pay_or_refund.html
@@ -13,7 +13,7 @@ Examples:
)
</%doc>
-<% include('/elements/header.html', $title ) %>
+<& /elements/header.html, emt($title) &>
<FORM ACTION="<% $table %>.html" METHOD="GET">
<INPUT TYPE="hidden" NAME="magic" VALUE="_date">
@@ -23,7 +23,7 @@ Examples:
<TR>
<TH CLASS="background" COLSPAN=2 ALIGN="left">
- <FONT SIZE="+1">Search options</FONT>
+ <FONT SIZE="+1"><% mt('Search options') |h %></FONT>
</TH>
</TR>
@@ -31,18 +31,18 @@ Examples:
<TD ALIGN="right"><% ucfirst(PL($name_singular)) %> of type: </TD>
<TD>
<SELECT NAME="payby" onChange="payby_changed(this)">
- <OPTION VALUE="">all</OPTION>
- <OPTION VALUE="CARD">credit card (all)</OPTION>
- <OPTION VALUE="CARD-VisaMC">credit card (Visa/MasterCard)</OPTION>
- <OPTION VALUE="CARD-Amex">credit card (American Express)</OPTION>
- <OPTION VALUE="CARD-Discover">credit card (Discover)</OPTION>
- <OPTION VALUE="CARD-Maestro">credit card (Maestro/Switch/Solo)</OPTION>
- <OPTION VALUE="CHEK">electronic check / ACH</OPTION>
- <OPTION VALUE="BILL">check</OPTION>
- <OPTION VALUE="PREP">prepaid card</OPTION>
- <OPTION VALUE="CASH">cash</OPTION>
- <OPTION VALUE="WEST">Western Union</OPTION>
- <OPTION VALUE="MCRD">manual credit card</OPTION>
+ <OPTION VALUE=""><% mt('all') |h %></OPTION>
+ <OPTION VALUE="CARD"><% mt('credit card (all)') |h %></OPTION>
+ <OPTION VALUE="CARD-VisaMC"><% mt('credit card (Visa/MasterCard)') |h %></OPTION>
+ <OPTION VALUE="CARD-Amex"><% mt('credit card (American Express)') |h %></OPTION>
+ <OPTION VALUE="CARD-Discover"><% mt('credit card (Discover)') |h %></OPTION>
+ <OPTION VALUE="CARD-Maestro"><% mt('credit card (Maestro/Switch/Solo)') |h %></OPTION>
+ <OPTION VALUE="CHEK"><% mt('electronic check / ACH') |h %></OPTION>
+ <OPTION VALUE="BILL"><% mt('check') |h %></OPTION>
+ <OPTION VALUE="PREP"><% mt('prepaid card') |h %></OPTION>
+ <OPTION VALUE="CASH"><% mt('cash') |h %></OPTION>
+ <OPTION VALUE="WEST"><% mt('Western Union') |h %></OPTION>
+ <OPTION VALUE="MCRD"><% mt('manual credit card') |h %></OPTION>
</SELECT>
</TD>
</TR>
@@ -64,71 +64,66 @@ Examples:
</SCRIPT>
<TR>
- <TD ALIGN="right"><FONT ID="checkno_caption" COLOR="#bbbbbb">Check #: </FONT></TD>
+ <TD ALIGN="right"><FONT ID="checkno_caption" COLOR="#bbbbbb"><% mt('Check #:') |h %> </FONT></TD>
<TD>
<INPUT TYPE="text" NAME="payinfo" DISABLED STYLE="background-color: #dddddd">
</TD>
</TR>
- <% include( '/elements/tr-select-agent.html',
+ <& /elements/tr-select-agent.html,
'curr_value' => scalar($cgi->param('agentnum')),
- 'label' => 'for agent: ',
+ 'label' => emt('for agent: '),
'disable_empty' => 0,
- )
- %>
+ &>
- <% include( '/elements/tr-select-user.html' ) %>
+ <& /elements/tr-select-user.html &>
<TR>
- <TD ALIGN="right" VALIGN="center">Payment</TD>
+ <TD ALIGN="right" VALIGN="center"><% mt('Payment') |h %></TD>
<TD>
<TABLE>
- <% include( '/elements/tr-input-beginning_ending.html',
+ <& /elements/tr-input-beginning_ending.html,
layout => 'horiz',
- )
- %>
+ &>
</TABLE>
</TD>
</TR>
% if ( $void ) {
<TR>
- <TD ALIGN="right" VALIGN="center">Voided</TD>
+ <TD ALIGN="right" VALIGN="center"><% mt('Voided') |h %></TD>
<TD>
<TABLE>
- <% include( '/elements/tr-input-beginning_ending.html',
+ <& /elements/tr-input-beginning_ending.html,
prefix => 'void',
layout => 'horiz',
- )
- %>
+ &>
</TABLE>
</TD>
</TR>
% }
- <% include( '/elements/tr-input-lessthan_greaterthan.html',
- 'label' => 'Amount',
- 'field' => 'paid',
- )
- %>
+ <& /elements/tr-input-lessthan_greaterthan.html,
+ 'label' => emt('Amount'),
+ 'field' => 'paid',
+ &>
% if ( $table eq 'cust_pay' ) {
- <% include( '/elements/tr-checkbox.html',
- 'label' => 'Include tax names',
- 'field' => 'tax_names',
+ <& /elements/tr-checkbox.html,
+ 'label' => emt('Include tax names'),
+ 'field' => 'tax_names',
'value' => 1,
- )
- %>
+ &>
% }
</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>
my %opt = @_;