summaryrefslogtreecommitdiff
path: root/httemplate/edit/pkg_class.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/pkg_class.html')
-rw-r--r--httemplate/edit/pkg_class.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/httemplate/edit/pkg_class.html b/httemplate/edit/pkg_class.html
new file mode 100644
index 000000000..26bc8baa5
--- /dev/null
+++ b/httemplate/edit/pkg_class.html
@@ -0,0 +1,28 @@
+<% include( 'elements/edit.html',
+ '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' => '' });
+</%init>