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

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

% } else { 

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

% } 

<%init>

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

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

</%init>