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', type=>'select-table', 'empty_label'=>'(none)', 'table'=>$category_table, 'name_col'=>'categoryname' }
34 : { field=>'categorynum', type=>'hidden' }
36 { field=>'disabled', type=>'checkbox', value=>'Y', },
38 push @$fields, @{ $opt{'addl_fields'} } if $opt{'addl_fields'};
41 %addl_labels = %{ $opt{'addl_labels'} } if $opt{'addl_labels'};