show imported region and rate #s, RT#83146
[freeside.git] / httemplate / edit / elements / class_Common.html
index a0025b3..723227f 100644 (file)
@@ -22,14 +22,21 @@ 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',
+              table       => $category_table,
+              hashref     => { 'disabled' => '' },
+              name_col    => 'categoryname',
+              empty_label => '(none)',
+            }
           : { field=>'categorynum', type=>'hidden' }
         ),
         { field=>'disabled', type=>'checkbox', value=>'Y', },