This commit was generated by cvs2svn to compensate for changes in r6255,
[freeside.git] / httemplate / elements / select-agent.html
1 <% include( '/elements/select-table.html',
2                  'table'       => 'agent',
3                  'name_col'    => 'agent',
4                  'value'       => $agentnum || '',
5                  'empty_label' => 'all',
6                  'hashref'     => { 'disabled' => '' },
7                  'extra_sql'   => ' AND '.
8                                   $FS::CurrentUser::CurrentUser->agentnums_sql.
9                                   ' ORDER BY agent',
10                  %opt,
11              )
12 %>
13 <%init>
14
15 my %opt = @_;
16 my $agentnum = $opt{'curr_value'} || $opt{'value'};
17
18 $opt{'records'} = delete $opt{'agents'}
19   if $opt{'agents'};
20
21 </%init>