X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpkg_class.html;h=26bc8baa5c0418fabce57a3b38c71fd628da00fd;hb=dae7ad7ff2a06ae047de9fd6d88e74edc526b4ad;hp=eddbfc16ea6bad8cffbd9c5346f507743cf9ad3e;hpb=0930d22ffc440f80c1b222b2e750cadbabd9e8f6;p=freeside.git diff --git a/httemplate/edit/pkg_class.html b/httemplate/edit/pkg_class.html index eddbfc16e..26bc8baa5 100644 --- a/httemplate/edit/pkg_class.html +++ b/httemplate/edit/pkg_class.html @@ -3,12 +3,17 @@ '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' => { - 'classnum' => 'Class number', - 'classname' => 'Class name', - 'disabled' => 'Disable class', + 'classnum' => 'Class number', + 'classname' => 'Class name', + 'categorynum' => 'Category', + 'disabled' => 'Disable class', }, 'viewall_dir' => 'browse', ) @@ -19,4 +24,5 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); +my @category = qsearch('pkg_category', { 'disabled' => '' });