This commit was generated by cvs2svn to compensate for changes in r11022,
[freeside.git] / httemplate / search / report_svc_hardware.html
1 <% include('/elements/header.html', $title ) %>
2
3 <FORM ACTION="svc_hardware.cgi" METHOD="GET">
4
5   <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
6     <TR>
7       <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Search options</FONT></TH>
8     </TR>
9
10     <TR><TD>
11     <% include('/elements/selectlayers.html',
12                   'field'           => 'classnum',
13                   'label'           => '',
14                   'options'         => \@classnums,
15                   'labels'          => \%class_labels,
16                   'layer_callback'  => \&layer_callback,
17                   'html_between'    => '</TD><TD>',
18               ) %>
19     </TD></TR>
20
21     <% include('/elements/tr-input-text.html',
22                   'field' => 'serial',
23                   'label' => 'Serial #',
24               ) %>
25     <% include('/elements/tr-input-text.html',
26                   'field' => 'hw_addr',
27                   'label' => 'Hardware address',
28               ) %>
29     <% include('/elements/tr-input-text.html',
30                   'field' => 'ip_addr',
31                   'label' => 'IP address',
32               ) %>
33     <% include('/elements/tr-select-table.html',
34                   'field'     => 'statusnum',
35                   'label'     => 'Service status',
36                   'table'     => 'hardware_status',
37                   'name_col'  => 'label',
38                   'empty_label' => 'any',
39               ) %>
40  
41   </TABLE>
42
43 <BR>
44 <INPUT TYPE="submit" VALUE="Search">
45
46 </FORM>
47
48 <% include('/elements/footer.html') %>
49 <%init>
50
51 die "access denied"
52   unless $FS::CurrentUser::CurrentUser->access_right('List packages'); #?
53
54 my $title = 'Hardware Service Report';
55
56 my @classes = qsearch('hardware_class', {});
57 my @classnums = ('', map { $_->classnum } @classes);
58 my %class_labels = ('' => 'Select hardware class',
59                      map { $_->classnum => $_->classname } @classes);
60
61 sub layer_callback {
62   my $classnum = shift or return '';
63   include('/elements/select-hardware_type.html',
64               'field'       => 'classnum'.$classnum.'typenum',
65               'classnum'    => $classnum,
66               'empty_label' => 'any',
67           );
68 }
69   
70 </%init>
71