[freeside-commits] freeside/httemplate/elements tr-select-cust_class.html, NONE, 1.1 select-cust_class.html, NONE, 1.1

Ivan,,, ivan at wavetail.420.am
Thu Oct 29 11:38:11 PDT 2009


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

Added Files:
	tr-select-cust_class.html select-cust_class.html 
Log Message:
customer classification, RT#6376

--- NEW FILE: select-cust_class.html ---
<% include( '/elements/select-table.html',
                 'table'       => 'cust_class',
                 'name_col'    => 'classname',
                 'value'       => $classnum,
                 'empty_label' => '(none)',
                 'hashref'     => { 'disabled' => '' },
                 %opt,
             )
%>
<%init>

my %opt = @_;
my $classnum = $opt{'curr_value'} || $opt{'value'};

$opt{'records'} = delete $opt{'cust_class'}
  if $opt{'cust_class'};

</%init>

--- NEW FILE: tr-select-cust_class.html ---
% if ( scalar(@{ $opt{'cust_class'} }) == 0 ) { 

  <INPUT TYPE="hidden" NAME="<% $opt{'element_name'} || $opt{'field'} || 'classnum' %>" VALUE="">

% } else { 

  <TR>
    <TD ALIGN="right"><% $opt{'label'} || 'Customer class' %></TD>
    <TD>
      <% include( '/elements/select-cust_class.html',
                    'curr_value' => $classnum,
                    %opt
                )
      %>
    </TD>
  </TR>

% } 

<%init>

my %opt = @_;
my $classnum = $opt{'curr_value'} || $opt{'value'};

$opt{'cust_class'} ||= [ qsearch( 'cust_class', { disabled=>'' } ) ];

</%init>



More information about the freeside-commits mailing list