This commit was generated by cvs2svn to compensate for changes in r11022,
[freeside.git] / httemplate / edit / elements / class_Common.html
1 <% include( 'edit.html',
2               'fields' => [
3                             'classname',
4                             (scalar(@category)
5                               ? { field=>'categorynum', type=>'select-table', 'empty_label'=>'(none)', 'table'=>'pkg_category', 'name_col'=>'categoryname' }
6                               : { field=>'categorynum', type=>'hidden' }
7                             ),
8                             { field=>'disabled', type=>'checkbox', value=>'Y', },
9                           ],
10               'labels' => { 
11                             'classnum'    => 'Class number',
12                             'classname'   => 'Class name',
13                             'categorynum' => 'Category',
14                             'disabled'    => 'Disable class',
15                           },
16               'viewall_dir' => 'browse',
17               %opt,
18            )
19           
20 %>
21 <%init>
22
23 die "access denied"
24   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
25
26 my %opt = @_;
27
28 my $table = $opt{'table'};
29
30 my @category;
31 unless ( $opt{'nocat'} ) {
32     ( my $category_table = $table ) =~ s/class/category/ or die;
33     @category = qsearch($category_table, { 'disabled' => '' });
34 }
35
36 </%init>