From 698797ff979b7c501eb171d14720b508d7201a3a Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 15 Mar 2010 02:06:38 +0000 Subject: [PATCH] fix diabled package optional reporting classes still selectable on package def edit, RT#7658 --- httemplate/edit/part_pkg.cgi | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index a02545f84..f9818c4f9 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -162,15 +162,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, }, @@ -256,7 +258,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) @@ -409,7 +411,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+)$/ && -- 2.11.0