projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
73cc2b3
)
4.x style advanced customer search
author
Ivan Kohler
<ivan@freeside.biz>
Sat, 22 Oct 2016 11:19:53 +0000
(
04:19
-0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Sat, 22 Oct 2016 11:19:53 +0000
(
04:19
-0700)
FS/FS/Mason.pm
patch
|
blob
|
history
httemplate/elements/tr-input-lessthan_greaterthan.html
patch
|
blob
|
history
httemplate/elements/tr-select-cust-fields.html
patch
|
blob
|
history
httemplate/search/report_cust_main.html
patch
|
blob
|
history
diff --git
a/FS/FS/Mason.pm
b/FS/FS/Mason.pm
index
041b76c
..
cb195a0
100644
(file)
--- a/
FS/FS/Mason.pm
+++ b/
FS/FS/Mason.pm
@@
-129,6
+129,7
@@
if ( -e $addl_handler_use_file ) {
midnight_sql regexp_sql
);
use FS::Conf;
midnight_sql regexp_sql
);
use FS::Conf;
+ use FS::ConfDefaults;
use FS::CGI qw(header menubar table itable ntable idiot
eidiot myexit http_header);
use FS::UI::Web qw(svc_url random_id
use FS::CGI qw(header menubar table itable ntable idiot
eidiot myexit http_header);
use FS::UI::Web qw(svc_url random_id
diff --git
a/httemplate/elements/tr-input-lessthan_greaterthan.html
b/httemplate/elements/tr-input-lessthan_greaterthan.html
index
16c2ed9
..
961be5b
100644
(file)
--- a/
httemplate/elements/tr-input-lessthan_greaterthan.html
+++ b/
httemplate/elements/tr-input-lessthan_greaterthan.html
@@
-1,10
+1,10
@@
<TR>
<TR>
- <T
D ALIGN="right"><% $opt{label} %> less than: </TD
>
+ <T
H ALIGN="right"><% $opt{label} %> less than: </TH
>
<TD><INPUT TYPE="text" NAME="<% $opt{field} %>_lt" SIZE=7></TD>
</TR>
<TR>
<TD><INPUT TYPE="text" NAME="<% $opt{field} %>_lt" SIZE=7></TD>
</TR>
<TR>
- <T
D ALIGN="right"><% $opt{label} %> greater than: </TD
>
+ <T
H ALIGN="right"><% $opt{label} %> greater than: </TH
>
<TD><INPUT TYPE="text" NAME="<% $opt{field} %>_gt" SIZE=7></TD>
</TR>
<TD><INPUT TYPE="text" NAME="<% $opt{field} %>_gt" SIZE=7></TD>
</TR>
diff --git
a/httemplate/elements/tr-select-cust-fields.html
b/httemplate/elements/tr-select-cust-fields.html
index
80562fe
..
dd85133
100644
(file)
--- a/
httemplate/elements/tr-select-cust-fields.html
+++ b/
httemplate/elements/tr-select-cust-fields.html
@@
-1,15
+1,11
@@
-%
-% my( $cust_fields, %opt ) = @_;
-%
-% use FS::ConfDefaults;
-% $opt{'avail_fields'} ||= [ FS::ConfDefaults->cust_fields_avail() ];
-%
-%
-
-
<TR>
<TR>
- <TD ALIGN="right"><% $opt{'label'} || 'Customer fields' %></TD>
- <TD>
- <% include( '/elements/select-cust-fields.html', $cust_fields, %opt ) %>
- </TD>
+ <TH ALIGN="right"><% $opt{'label'} || mt('Customer fields') |h %></TH>
+ <TD><& /elements/select-cust-fields.html, $cust_fields, %opt &></TD>
</TR>
</TR>
+<%init>
+
+my( $cust_fields, %opt ) = @_;
+
+$opt{'avail_fields'} ||= [ FS::ConfDefaults->cust_fields_avail() ];
+
+</%init>
diff --git
a/httemplate/search/report_cust_main.html
b/httemplate/search/report_cust_main.html
index
ba7c99a
..
8fac845
100755
(executable)
--- a/
httemplate/search/report_cust_main.html
+++ b/
httemplate/search/report_cust_main.html
@@
-3,11
+3,8
@@
<FORM ACTION="cust_main.html" METHOD="GET">
<INPUT TYPE="hidden" NAME="magic" VALUE="bill">
<FORM ACTION="cust_main.html" METHOD="GET">
<INPUT TYPE="hidden" NAME="magic" VALUE="bill">
- <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
-
- <TR>
- <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Basic search options') |h %></FONT></TH>
- </TR>
+ <FONT CLASS="fsinnerbox-title"><% emt('Basic search options') %></FONT>
+ <TABLE CLASS="fsinnerbox">
<& /elements/tr-select-agent.html,
'curr_value' => scalar($cgi->param('agentnum')),
<& /elements/tr-select-agent.html,
'curr_value' => scalar($cgi->param('agentnum')),
@@
-19,6
+16,7
@@
'pre_options' => [ '' => 'all',
0 => '(none)', ],
'disable_empty' => 1,
'pre_options' => [ '' => 'all',
0 => '(none)', ],
'disable_empty' => 1,
+ 'th' => 1,
&>
<& /elements/tr-select-cust_main-status.html,
&>
<& /elements/tr-select-cust_main-status.html,
@@
-40,7
+38,7
@@
&>
<TR>
&>
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('Signup date') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('Signup date') |h %></TH
>
<TD>
<TABLE>
<& /elements/tr-input-beginning_ending.html,
<TD>
<TABLE>
<& /elements/tr-input-beginning_ending.html,
@@
-53,7
+51,7
@@
% if ( $conf->exists('cust_main-enable_birthdate') ) {
<TR>
% if ( $conf->exists('cust_main-enable_birthdate') ) {
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('Date of Birth') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('Date of Birth') |h %></TH
>
<TD>
<TABLE>
<& /elements/tr-input-beginning_ending.html,
<TD>
<TABLE>
<& /elements/tr-input-beginning_ending.html,
@@
-67,7
+65,7
@@
% if ( $conf->exists('cust_main-enable_spouse_birthdate') ) {
<TR>
% if ( $conf->exists('cust_main-enable_spouse_birthdate') ) {
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('Spouse Date of Birth') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('Spouse Date of Birth') |h %></TH
>
<TD>
<TABLE>
<& /elements/tr-input-beginning_ending.html,
<TD>
<TABLE>
<& /elements/tr-input-beginning_ending.html,
@@
-81,7
+79,7
@@
% if ( $conf->exists('cust_main-enable_anniversary_date') ) {
<TR>
% if ( $conf->exists('cust_main-enable_anniversary_date') ) {
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('Anniversary Date') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('Anniversary Date') |h %></TH
>
<TD>
<TABLE>
<& /elements/tr-input-beginning_ending.html,
<TD>
<TABLE>
<& /elements/tr-input-beginning_ending.html,
@@
-94,7
+92,7
@@
% }
<TR>
% }
<TR>
- <T
D ALIGN="right">Tags</TD
>
+ <T
H ALIGN="right">Tags</TH
>
<TD>
<& /elements/select-cust_tag.html,
'cgi' => $cgi,
<TD>
<& /elements/select-cust_tag.html,
'cgi' => $cgi,
@@
-110,7
+108,7
@@
</TR>
<TR>
</TR>
<TR>
- <T
D ALIGN="right">With package of class</TD
>
+ <T
H ALIGN="right">With package of class</TH
>
<TD>
<& /elements/select-pkg_class.html,
'field' => 'pkg_classnum',
<TD>
<& /elements/select-pkg_class.html,
'field' => 'pkg_classnum',
@@
-126,21
+124,19
@@
</TD>
</TR>
</TD>
</TR>
- <TR>
- <TH CLASS="background" COLSPAN=2> </TH>
- </TR>
+ </TABLE>
+ <BR>
- <TR>
- <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Location search options') |h %></FONT></TH>
- </TR>
+ <FONT CLASS="fsinnerbox-title"><% emt('Location search options') %></FONT>
+ <TABLE CLASS="fsinnerbox">
<TR>
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('Address') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('Address') |h %></TH
>
<TD><INPUT TYPE="text" NAME="address" SIZE=54></TD>
</TR>
<TR>
<TD><INPUT TYPE="text" NAME="address" SIZE=54></TD>
</TR>
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('City') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('City') |h %></TH
>
<TD>
<& /elements/city.html,
disable_empty => 0,
<TD>
<& /elements/city.html,
disable_empty => 0,
@@
-151,7
+147,7
@@
</TR>
<TR>
</TR>
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('County') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('County') |h %></TH
>
<TD>
<& /elements/select-county.html,
disable_empty => 0,
<TD>
<& /elements/select-county.html,
disable_empty => 0,
@@
-161,7
+157,7
@@
</TR>
<TR>
</TR>
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('State') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('State') |h %></TH
>
<TD>
<& /elements/select-state.html,
disable_empty => 0,
<TD>
<& /elements/select-state.html,
disable_empty => 0,
@@
-171,12
+167,12
@@
</TR>
<TR>
</TR>
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('Zip') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('Zip') |h %></TH
>
<TD><INPUT TYPE="text" NAME="zip" SIZE=12></TD>
</TR>
<TR>
<TD><INPUT TYPE="text" NAME="zip" SIZE=12></TD>
</TR>
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('Country') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('Country') |h %></TH
>
<TD>
<& /elements/select-country.html,
disable_empty => 0,
<TD>
<& /elements/select-country.html,
disable_empty => 0,
@@
-186,25
+182,23
@@
</TD>
</TR>
</TD>
</TR>
- <TR>
- <TH CLASS="background" COLSPAN=2> </TH>
- </TR>
+ </TABLE>
+ <BR>
- <TR>
- <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Billing search options') |h %></FONT></TH>
- </TR>
+ <FONT CLASS="fsinnerbox-title"><% emt('Billing search options') %></FONT>
+ <TABLE CLASS="fsinnerbox">
% my @exempt_groups = grep /\S/, $conf->config('tax-cust_exempt-groups');
% unless ( @exempt_groups ) {
% #falze laziness with With/Without postal mail invoices
<TR>
% my @exempt_groups = grep /\S/, $conf->config('tax-cust_exempt-groups');
% unless ( @exempt_groups ) {
% #falze laziness with With/Without postal mail invoices
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('Tax exempt') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('Tax exempt') |h %></TH
>
<TD><INPUT TYPE="checkbox" NAME="tax" ID="tax" onClick="tax_changed();"></TD>
</TR>
<TR>
<TD><INPUT TYPE="checkbox" NAME="tax" ID="tax" onClick="tax_changed();"></TD>
</TR>
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('Not tax exempt') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('Not tax exempt') |h %></TH
>
<TD><INPUT TYPE="checkbox" NAME="no_tax" ID="no_tax" onClick="no_tax_changed();"></TD>
</TR>
<TD><INPUT TYPE="checkbox" NAME="no_tax" ID="no_tax" onClick="no_tax_changed();"></TD>
</TR>
@@
-223,7
+217,7
@@
% }
<TR>
% }
<TR>
- <T
D ALIGN="right"><% mt('Invoice terms') |h %></TD
>
+ <T
H ALIGN="right"><% mt('Invoice terms') |h %></TH
>
<TD>
% my @agentnums = $FS::CurrentUser::CurrentUser->agentnums;
% my $agentnum = scalar(@agentnums) == 1 ? $agentnums[0] : '';
<TD>
% my @agentnums = $FS::CurrentUser::CurrentUser->agentnums;
% my $agentnum = scalar(@agentnums) == 1 ? $agentnums[0] : '';
@@
-241,17
+235,17
@@
&>
<TR>
&>
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('With invoicing email address(es)') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('With invoicing email address(es)') |h %></TH
>
<TD><INPUT TYPE="checkbox" NAME="with_email"></TD>
</TR>
<TR>
<TD><INPUT TYPE="checkbox" NAME="with_email"></TD>
</TR>
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('With postal mail invoices') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('With postal mail invoices') |h %></TH
>
<TD><INPUT TYPE="checkbox" NAME="POST" ID="POST" onClick="POST_changed();"></TD>
</TR>
<TR>
<TD><INPUT TYPE="checkbox" NAME="POST" ID="POST" onClick="POST_changed();"></TD>
</TR>
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('Without postal mail invoices') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('Without postal mail invoices') |h %></TH
>
<TD><INPUT TYPE="checkbox" NAME="no_POST" ID="no_POST" onClick="no_POST_changed();"></TD>
</TR>
<TD><INPUT TYPE="checkbox" NAME="no_POST" ID="no_POST" onClick="no_POST_changed();"></TD>
</TR>
@@
-268,22
+262,21
@@
}
</SCRIPT>
}
</SCRIPT>
- <TR>
- <TH CLASS="background" COLSPAN=2> </TH>
- </TR>
+ </TABLE>
+ <BR>
+
+ <FONT CLASS="fsinnerbox-title"><% emt('Display options') %></FONT>
+ <TABLE CLASS="fsinnerbox">
- <TR>
- <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Display options') |h %></FONT></TH>
- </TR>
<& /elements/tr-select-cust-fields.html &>
<TR>
<& /elements/tr-select-cust-fields.html &>
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('Add package columns') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('Add package columns') |h %></TH
>
<TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
</TR>
<TR>
<TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
</TR>
<TR>
- <T
D ALIGN="right" VALIGN="center"><% mt('Include cancelled packages') |h %></TD
>
+ <T
H ALIGN="right" VALIGN="center"><% mt('Include cancelled packages') |h %></TH
>
<TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
</TR>
<TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
</TR>