X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-pkg_class.html;h=fbab0db14e9279688031337f57fb2a3951c23c2b;hp=de10885c8b793a7bacef55004734734178760c65;hb=e65c6a26ca778166aec2b2d1dd3012ab84fa611a;hpb=29644d5921c99520965b884b25800ed084891e94 diff --git a/httemplate/elements/tr-select-pkg_class.html b/httemplate/elements/tr-select-pkg_class.html index de10885c8..fbab0db14 100644 --- a/httemplate/elements/tr-select-pkg_class.html +++ b/httemplate/elements/tr-select-pkg_class.html @@ -1,16 +1,12 @@ <% my( $classnum, %opt ) = @_; - my @pkg_class; - if ( $opt{'pkg_class'} ) { - @pkg_class = @{ $opt{'pkg_class'} }; - } else { - @pkg_class = qsearch( 'pkg_class', {} ); # { disabled=>'' } ); - } + $opt{'pkg_class'} ||= [ qsearch( 'pkg_class', {} ) ]; # { disabled=>'' } ) + #warn "***** tr-select-pkg-class: \n". Dumper(%opt); %> -<% if ( scalar(@pkg_class) == 0 ) { %> +<% if ( scalar(@{ $opt{'pkg_class'} }) == 0 ) { %> @@ -19,10 +15,7 @@ <%= $opt{'label'} || 'Package class' %> - <%= include( '/elements/select-pkg_class.html', $classnum, - 'pkg_class' => \@pkg_class, - ) - %> + <%= include( '/elements/select-pkg_class.html', $classnum, %opt ) %>