[freeside-commits] freeside/httemplate/edit/elements class_Common.html, NONE, 1.1 category_Common.html, NONE, 1.1

Ivan,,, ivan at wavetail.420.am
Wed Oct 28 18:08:35 PDT 2009


Update of /home/cvs/cvsroot/freeside/httemplate/edit/elements
In directory wavetail.420.am:/tmp/cvs-serv30787/httemplate/edit/elements

Added Files:
	class_Common.html category_Common.html 
Log Message:
customer classification, RT#6376

--- NEW FILE: class_Common.html ---
<% include( 'edit.html',
              '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',
              %opt,
           )
          
%>
<%init>

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');

my %opt = @_;

my $table = $opt{'table'};
( my $category_table = $table ) =~ s/class/category/ or die;

my @category = qsearch($category_table, { 'disabled' => '' });
</%init>

--- NEW FILE: category_Common.html ---
<% include( 'edit.html',
              'fields' => [
                            'categoryname',
                            'weight',
                            { field=>'disabled', type=>'checkbox', value=>'Y', },
                          ],
              'labels' => { 
                            'categorynum'  => 'Category number',
                            'categoryname' => 'Category name',
                            'weight'       => 'Weight',
                            'disabled'     => 'Disable category',
                          },
              'viewall_dir' => 'browse',
              %opt,
           )
%>
<%init>

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');

my %opt = @_;

</%init>



More information about the freeside-commits mailing list