summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-select-pkg_class.html
blob: aa2760996d42c6641618e237fc78b9420d5410ed (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{'field'} || 'classnum' %>" VALUE="">

% } else { 

  <TR>
    <TD ALIGN="right"><% $opt{'label'} || 'Package class' %></TD>
    <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>