X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_svc_hardware.html;h=b0bfc08c7f6d8d196bf6af9cc3de212a0137add6;hp=4a763b0b4054264b65dc57952ccba38eaf71359c;hb=HEAD;hpb=b65b8096089410001dfbcd35f9a56f9405b9f5f1 diff --git a/httemplate/search/report_svc_hardware.html b/httemplate/search/report_svc_hardware.html index 4a763b0b4..b0bfc08c7 100755 --- a/httemplate/search/report_svc_hardware.html +++ b/httemplate/search/report_svc_hardware.html @@ -7,20 +7,24 @@ Search options - - <% include('/elements/selectlayers.html', - 'field' => 'classnum', - 'label' => '', - 'options' => \@classnums, - 'labels' => \%class_labels, - 'layer_callback' => \&layer_callback, - 'html_between' => '', - ) %> + <& /elements/tr-td-label.html, label => 'Device type' &> +%# <% include('/elements/selectlayers.html', +%# 'field' => 'classnum', +%# 'label' => '', +%# 'options' => \@classnums, +%# 'labels' => \%class_labels, +%# 'layer_callback' => \&layer_callback, +%# 'html_between' => '', +%# ) %> + + <& /elements/select-hardware_type.html, + 'empty_label' => '(all)' + &> <% include('/elements/tr-input-text.html', 'field' => 'serial', - 'label' => 'Serial #', + 'label' => 'Serial number', ) %> <% include('/elements/tr-input-text.html', 'field' => 'hw_addr', @@ -30,12 +34,20 @@ 'field' => 'ip_addr', 'label' => 'IP address', ) %> + <% include('/elements/tr-input-text.html', + 'field' => 'smartcard', + 'label' => 'Smartcard #', + ) %> <% include('/elements/tr-select-table.html', 'field' => 'statusnum', 'label' => 'Service status', 'table' => 'hardware_status', 'name_col' => 'label', 'empty_label' => 'any', + 'hashref' => {}, + 'extra_sql' => ' WHERE hardware_status.disabled IS NULL +OR (SELECT COUNT(*) FROM svc_hardware + WHERE svc_hardware.statusnum = hardware_status.statusnum) > 0', ) %> @@ -49,7 +61,7 @@ <%init> die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('List packages'); #? + unless $FS::CurrentUser::CurrentUser->access_right('Services: Hardware: Advanced search'); my $title = 'Hardware Service Report'; @@ -63,6 +75,7 @@ sub layer_callback { include('/elements/select-hardware_type.html', 'field' => 'classnum'.$classnum.'typenum', 'classnum' => $classnum, + 'prefix' => $classnum, 'empty_label' => 'any', ); }