diff options
author | ivan <ivan> | 2004-01-03 18:14:58 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-01-03 18:14:58 +0000 |
commit | 98dad00b5dbca92a649d32dce7001163434539cc (patch) | |
tree | a79521dda6d07aa7a936b84f8364675c08edbe4f | |
parent | 88403f41fcb20ed20ef08eed3bd28713332eb60a (diff) |
oops, forgot to backport agent selection from 1.5
-rwxr-xr-x | httemplate/search/cust_pkg_report.cgi | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/httemplate/search/cust_pkg_report.cgi b/httemplate/search/cust_pkg_report.cgi index 0dad83a2a..b31674540 100755 --- a/httemplate/search/cust_pkg_report.cgi +++ b/httemplate/search/cust_pkg_report.cgi @@ -36,6 +36,23 @@ }); </SCRIPT> </TR> +<% my %agent_search = dbdef->table('agent')->column('disabled') + ? ( 'disabled' => '' ) : (); + my @agents = qsearch( 'agent', \%agent_search ); + if ( scalar(@agents) == 1 ) { +%> + <INPUT TYPE="hidden" NAME="agentnum" VALUE="<%= $agents[0]->agentnum %>"> +<% } else { %> + + <TR> + <TD ALIGN="right">Agent: </TD> + <TD><SELECT NAME="agentnum"><OPTION VALUE="">(all) + <% foreach my $agent ( sort { $a->agent cmp $b->agent; } @agents) { %> + <OPTION VALUE="<%= $agent->agentnum %>"><%= $agent->agent %> + <% } %> + </TD> + </TR> +<% } %> </TABLE> <BR><INPUT TYPE="submit" VALUE="Get Report"> |