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
28
29
30
31
32
33
34
35
36
|
<& /elements/select-tiered.html, tiers => [
{
field => 'classnum',
table => 'hardware_class',
hashref => ($classnum ? { classnum => $classnum } : {}),
name_col => 'classname',
empty_label => '(all)',
},
{
field => 'model',
table => 'hardware_type',
select => 'classnum, model',
name_col => 'model',
value_col => 'model',
link_col => 'classnum',
hashref => $hashref,
extra_sql => 'GROUP BY classnum, model',
empty_label => '(all)',
},
{
table => 'hardware_type',
name_col => 'revision',
value_col => 'typenum',
link_col => 'model',
empty_label => $opt{'empty_label'},
},
],
field => 'typenum',
%opt,
&>
<%init>
my %opt = @_;
my $hashref = $opt{'hashref'} || {};
my $classnum = $hashref->{classnum};
</%init>
|