summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/search')
-rwxr-xr-xhttemplate/search/cust_main.cgi5
-rwxr-xr-xhttemplate/search/cust_pkg.cgi2
-rw-r--r--httemplate/search/reg_code.html2
-rwxr-xr-xhttemplate/search/report_cust_pkg.html28
4 files changed, 32 insertions, 5 deletions
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi
index 658069b08..e65dc7117 100755
--- a/httemplate/search/cust_main.cgi
+++ b/httemplate/search/cust_main.cgi
@@ -485,8 +485,7 @@
%# my $part_pkg = qsearchs( 'part_pkg', { pkgpart => $_->pkgpart } );
% my $part_pkg = $_->part_pkg;
%
-% my $pkg = $part_pkg->pkg;
-% my $comment = $part_pkg->comment;
+% my $pkg_comment = $part_pkg->pkg_comment(nopkgpart => 1);
% my $show = $curuser->default_customer_view =~ /^(jumbo|packages)$/
% ? ''
% : ';show=packages';
@@ -496,7 +495,7 @@
% #my(@cust_svc) = qsearch( 'cust_svc', { 'pkgnum' => $_->pkgnum } );
% my $rowspan = scalar(@cust_svc) || 1;
%
-% print $n1, qq!<TD CLASS="grid" BGCOLOR="$bgcolor" ROWSPAN=$rowspan><A HREF="$pkgview"><FONT SIZE=-1>$pkg - $comment</FONT></A></TD>!;
+% print $n1, qq!<TD CLASS="grid" BGCOLOR="$bgcolor" ROWSPAN=$rowspan><A HREF="$pkgview"><FONT SIZE=-1>$pkg_comment</FONT></A></TD>!;
%
% my($n2)='';
% foreach my $cust_svc ( @cust_svc ) {
diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi
index 2a702801c..13d0c7af8 100755
--- a/httemplate/search/cust_pkg.cgi
+++ b/httemplate/search/cust_pkg.cgi
@@ -161,7 +161,7 @@ my $money_char = $conf->config('money_char') || '$';
$search_hash{'query'} = $cgi->keywords;
- for my $param (qw(agentnum magic status classnum pkgpart)) {
+ for my $param (qw(agentnum magic status classnum pkgpart custom)) {
$search_hash{$param} = $cgi->param($param)
if $cgi->param($param);
}
diff --git a/httemplate/search/reg_code.html b/httemplate/search/reg_code.html
index f65b00d05..f7d6d2061 100644
--- a/httemplate/search/reg_code.html
+++ b/httemplate/search/reg_code.html
@@ -13,7 +13,7 @@
sub {
map {
qq!<A HREF="${p}edit/part_pkg.cgi?!. $_->pkgpart. '">'.
- $_->pkg. ' - '. $_->comment.
+ $_->pkg_comment(nopkgpart => 1).
'</A><BR>'
} $_[0]->part_pkg
},
diff --git a/httemplate/search/report_cust_pkg.html b/httemplate/search/report_cust_pkg.html
index b5d2d8b79..3840663cf 100755
--- a/httemplate/search/report_cust_pkg.html
+++ b/httemplate/search/report_cust_pkg.html
@@ -89,6 +89,34 @@
% }
+ <SCRIPT TYPE="text/javascript">
+
+ function custom_changed(what) {
+
+ if ( what.checked ) {
+
+ what.form.pkgpart.disabled = true;
+ what.form.pkgpart.style.backgroundColor = '#dddddd';
+
+ } else {
+
+ what.form.pkgpart.disabled = false;
+ what.form.pkgpart.style.backgroundColor = '#ffffff';
+
+ }
+
+ }
+
+ </SCRIPT>
+
+ <% include( '/elements/tr-checkbox.html',
+ 'label' => 'Custom packages',
+ 'field' => 'custom',
+ 'value' => 1,
+ 'onchange' => 'custom_changed(this);',
+ )
+ %>
+
<% include( '/elements/tr-selectmultiple-part_pkg.html' ) %>
<TR>