'table' => 'pkg_class',
'fields' => [
'classname',
+ (scalar(@category)
+ ? { field=>'categorynum', type=>'select-table', 'empty_label'=>'(none)', 'table'=>'pkg_category', 'name_col'=>'categoryname' }
+ : { field=>'categorynum', type=>'hidden' }
+ ),
{ field=>'disabled', type=>'checkbox', value=>'Y', },
],
'labels' => {
)
%>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+my @category = qsearch('pkg_category', { 'disabled' => '' });
+</%init>