26bc8baa5c0418fabce57a3b38c71fd628da00fd
[freeside.git] / httemplate / edit / pkg_class.html
1 <% include( 'elements/edit.html',
2               'name'   => 'Package Class',
3               'table'  => 'pkg_class',
4               'fields' => [
5                             'classname',
6                             (scalar(@category)
7                               ? { field=>'categorynum', type=>'select-table', 'empty_label'=>'(none)', 'table'=>'pkg_category', 'name_col'=>'categoryname' }
8                               : { field=>'categorynum', type=>'hidden' }
9                             ),
10                             { field=>'disabled', type=>'checkbox', value=>'Y', },
11                           ],
12               'labels' => { 
13                             'classnum'    => 'Class number',
14                             'classname'   => 'Class name',
15                             'categorynum' => 'Category',
16                             'disabled'    => 'Disable class',
17                           },
18               'viewall_dir' => 'browse',
19            )
20           
21 %>
22 <%init>
23
24 die "access denied"
25   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
26
27 my @category = qsearch('pkg_category', { 'disabled' => '' });
28 </%init>