1 <% include( 'edit.html',
4 'classnum' => 'Class number',
5 'classname' => 'Class name',
6 'categorynum' => 'Category',
7 'disabled' => 'Disable class',
10 'viewall_dir' => 'browse',
18 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
22 my $table = $opt{'table'};
25 unless ( $opt{'nocat'} ) {
26 ( my $category_table = $table ) =~ s/class/category/ or die;
27 @category = qsearch($category_table, { 'disabled' => '' });
30 my $fields = [ 'classname',
32 ? { field=>'categorynum', type=>'select-table', 'empty_label'=>'(none)', 'table'=>'pkg_category', 'name_col'=>'categoryname' }
33 : { field=>'categorynum', type=>'hidden' }
35 { field=>'disabled', type=>'checkbox', value=>'Y', },
37 push @$fields, $opt{'addl_fields'} if $opt{'addl_fields'};
40 %addl_labels = %{$opt{'addl_labels'}} if $opt{'addl_labels'};