summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2010-03-15 02:06:37 +0000
committerivan <ivan>2010-03-15 02:06:37 +0000
commita6bd5190b8b5434c6b59517fc6467491e00e2edb (patch)
tree1f43472838c303ee898eb1af04cace12cb8439d8 /httemplate
parent22ca0c30a201124201836f6c6394dad06c2a11c1 (diff)
fix diabled package optional reporting classes still selectable on package def edit, RT#7658
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/edit/part_pkg.cgi11
1 files changed, 6 insertions, 5 deletions
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index f2c7448d5..538ba3478 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -170,15 +170,17 @@
{ type => 'columnend' },
- { 'type' => $census ? 'tablebreak-tr-title'
- : 'hidden',
+ { 'type' => $report_option ? 'tablebreak-tr-title'
+ : 'hidden',
'value' => 'Optional report classes',
'field' => 'census_title',
},
{ 'field' => 'report_option',
- 'type' => $census ? 'select-table' : 'hidden',
+ 'type' => $report_option ? 'select-table'
+ : 'hidden',
'table' => 'part_pkg_report_option',
'name_col' => 'name',
+ 'hashref' => { 'disabled' => '' },
'multiple' => 1,
},
@@ -264,7 +266,7 @@ my $sth = dbh->prepare("SELECT COUNT(*) FROM part_pkg_report_option".
" WHERE disabled IS NULL OR disabled = '' ")
or die dbh->errstr;
$sth->execute or die $sth->errstr;
-my $census = $sth->fetchrow_arrayref->[0];
+my $report_option = $sth->fetchrow_arrayref->[0];
#XXX
# - tr-part_pkg_freq: month_increments_only (from price plans)
@@ -417,7 +419,6 @@ my $m2_error_callback_maker = sub {
my $link_type = shift; #yay closures
return sub {
my( $cgi, $object ) = @_;
- my $num;
map {
if ( /^${link_type}_dst_pkgpart(\d+)$/ &&