X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpkg_class.html;h=26bc8baa5c0418fabce57a3b38c71fd628da00fd;hb=cf7a127fa3172becaa4d43b7dd7e401100427891;hp=6f2b072f1fef4bff14608a40d8b80c74bfb38069;hpb=7002af78bc3e683ff8ce18b39de6d7de484422bf;p=freeside.git diff --git a/httemplate/edit/pkg_class.html b/httemplate/edit/pkg_class.html index 6f2b072f1..26bc8baa5 100644 --- a/httemplate/edit/pkg_class.html +++ b/httemplate/edit/pkg_class.html @@ -3,14 +3,26 @@ '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', ) %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my @category = qsearch('pkg_category', { 'disabled' => '' }); +