X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpkg_class.html;h=26bc8baa5c0418fabce57a3b38c71fd628da00fd;hb=87a986f35b347affed5f1e1ff5c5c7c59ccd4ad1;hp=181072f71e86bdd18a6b3dfdf6bb7965d3a58d7b;hpb=c8cccb4a92adceb943c635fe62dad0d034462ce0;p=freeside.git diff --git a/httemplate/edit/pkg_class.html b/httemplate/edit/pkg_class.html index 181072f71..26bc8baa5 100644 --- a/httemplate/edit/pkg_class.html +++ b/httemplate/edit/pkg_class.html @@ -1,10 +1,28 @@ <% include( 'elements/edit.html', - 'name' => 'Package Class', - 'table' => 'pkg_class', - 'labels' => { - 'classnum' => 'Class number', - 'classname' => 'Class name', - }, - 'viewall_dir' => 'browse', + 'name' => 'Package Class', + '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', + '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' => '' }); +