1 <% include('/elements/header.html', $title ) %>
3 <FORM ACTION="svc_hardware.cgi" METHOD="GET">
5 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
7 <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Search options</FONT></TH>
10 <& /elements/tr-td-label.html, label => 'Device type' &>
11 %# <% include('/elements/selectlayers.html',
12 %# 'field' => 'classnum',
14 %# 'options' => \@classnums,
15 %# 'labels' => \%class_labels,
16 %# 'layer_callback' => \&layer_callback,
17 %# 'html_between' => '</TD><TD>',
20 <& /elements/select-hardware_type.html,
21 'empty_label' => '(all)'
25 <% include('/elements/tr-input-text.html',
27 'label' => 'Serial number',
29 <% include('/elements/tr-input-text.html',
31 'label' => 'Hardware address',
33 <% include('/elements/tr-input-text.html',
35 'label' => 'IP address',
37 <% include('/elements/tr-input-text.html',
38 'field' => 'smartcard',
39 'label' => 'Smartcard #',
41 <% include('/elements/tr-select-table.html',
42 'field' => 'statusnum',
43 'label' => 'Service status',
44 'table' => 'hardware_status',
45 'name_col' => 'label',
46 'empty_label' => 'any',
48 'extra_sql' => ' WHERE hardware_status.disabled IS NULL
49 OR (SELECT COUNT(*) FROM svc_hardware
50 WHERE svc_hardware.statusnum = hardware_status.statusnum) > 0',
56 <INPUT TYPE="submit" VALUE="Search">
60 <% include('/elements/footer.html') %>
64 unless $FS::CurrentUser::CurrentUser->access_right('Services: Hardware: Advanced search');
66 my $title = 'Hardware Service Report';
68 my @classes = qsearch('hardware_class', {});
69 my @classnums = ('', map { $_->classnum } @classes);
70 my %class_labels = ('' => 'Select hardware class',
71 map { $_->classnum => $_->classname } @classes);
74 my $classnum = shift or return '';
75 include('/elements/select-hardware_type.html',
76 'field' => 'classnum'.$classnum.'typenum',
77 'classnum' => $classnum,
78 'prefix' => $classnum,
79 'empty_label' => 'any',