diff options
Diffstat (limited to 'httemplate/elements/tr-select-pkg_class.html')
-rw-r--r-- | httemplate/elements/tr-select-pkg_class.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/httemplate/elements/tr-select-pkg_class.html b/httemplate/elements/tr-select-pkg_class.html index aa27609..ece4b58 100644 --- a/httemplate/elements/tr-select-pkg_class.html +++ b/httemplate/elements/tr-select-pkg_class.html @@ -1,6 +1,6 @@ -% if ( scalar(@{ $opt{'pkg_class'} }) == 0 ) { +% if ( $count == 0 ) { - <INPUT TYPE="hidden" NAME="<% $opt{'field'} || 'classnum' %>" VALUE=""> + <INPUT TYPE="hidden" NAME="<% $opt{'element_name'} || $opt{'field'} || 'classnum' %>" VALUE=""> % } else { @@ -22,6 +22,6 @@ my %opt = @_; my $classnum = $opt{'curr_value'} || $opt{'value'}; -$opt{'pkg_class'} ||= [ qsearch( 'pkg_class', {} ) ]; # { disabled=>'' } ) +my $count = scalar( qsearch( 'pkg_class', {} ) ); </%init> |