summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-select-cust_class.html
blob: 54a11d79eb5c894b594d7b2800dc589afb073b60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
% 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>