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'};
26 unless ( $opt{'nocat'} ) {
27 ( $category_table = $table ) =~ s/class/category/ or die;
28 @category = qsearch($category_table, { 'disabled' => '' });
31 my $fields = [ 'classname',
33 ? { field => 'categorynum',
34 type => 'select-table',
35 table => $category_table,
36 hashref => { 'disabled' => '' },
37 name_col => 'categoryname',
38 empty_label => '(none)',
40 : { field=>'categorynum', type=>'hidden' }
42 { field=>'disabled', type=>'checkbox', value=>'Y', },
44 push @$fields, @{ $opt{'addl_fields'} } if $opt{'addl_fields'};
47 %addl_labels = %{ $opt{'addl_labels'} } if $opt{'addl_labels'};