summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-select-part_svc_class.html
blob: 2f4b09381c978432b9a61ea8953dd57ed63239c1 (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{'part_svc_class'} }) == 0 ) { 

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

% } else { 

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

% } 

<%init>

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

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

</%init>