diff options
Diffstat (limited to 'httemplate/edit/elements/class_Common.html')
-rw-r--r-- | httemplate/edit/elements/class_Common.html | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/httemplate/edit/elements/class_Common.html b/httemplate/edit/elements/class_Common.html index 69da4db31..0a0916ebc 100644 --- a/httemplate/edit/elements/class_Common.html +++ b/httemplate/edit/elements/class_Common.html @@ -22,21 +22,22 @@ my %opt = @_; my $table = $opt{'table'}; my @category; +my $category_table; unless ( $opt{'nocat'} ) { - ( my $category_table = $table ) =~ s/class/category/ or die; + ( $category_table = $table ) =~ s/class/category/ or die; @category = qsearch($category_table, { 'disabled' => '' }); } my $fields = [ 'classname', (scalar(@category) - ? { field=>'categorynum', type=>'select-table', 'empty_label'=>'(none)', 'table'=>'pkg_category', 'name_col'=>'categoryname' } + ? { field=>'categorynum', type=>'select-table', 'empty_label'=>'(none)', 'table'=>$category_table, 'name_col'=>'categoryname' } : { field=>'categorynum', type=>'hidden' } ), { field=>'disabled', type=>'checkbox', value=>'Y', }, ]; -push @$fields, $opt{'addl_fields'} if $opt{'addl_fields'}; +push @$fields, @{ $opt{'addl_fields'} } if $opt{'addl_fields'}; my %addl_labels = (); -%addl_labels = %{$opt{'addl_labels'}} if $opt{'addl_labels'}; +%addl_labels = %{ $opt{'addl_labels'} } if $opt{'addl_labels'}; </%init> |