quick list of area codes and a kludge to print DA numbers for all of them
[freeside.git] / httemplate / edit / pkg_class.html
index 6f2b072..26bc8ba 100644 (file)
@@ -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' => '' });
+</%init>