5 include( '/elements/tr-select-agent.html',
7 #recommended to keep things "sticky" on errors
8 'curr_value' => $curr_value,
14 'label' => 'Agent for this thing',
15 'empty_label' => 'Select agent', #override default
18 #set to 'None' or something to override default of showing all agents
19 #for employees w/ 'View customers of all agents' right
20 viewall_right => 'None',
25 % if ( scalar(@agents) == 1 ) {
27 <INPUT TYPE="hidden" NAME="<% $opt{'field'} || 'agentnum' %>" VALUE="<% $agents[0]->agentnum %>">
29 %# YUCK. empty row so we don't throw g_row in edit.html off :/
35 <TD ALIGN="right"><% $opt{'label'} || emt('Agent') %></TD>
37 <& /elements/select-agent.html,
38 'curr_value' => $agentnum,
50 my $agentnum = $opt{'curr_value'} || $opt{'value'};
55 : $FS::CurrentUser::CurrentUser->agents(
56 'viewall_right' => $opt{'viewall_right'},
59 my $colspan = $opt{'colspan'} ? 'COLSPAN="'.$opt{'colspan'}.'"' : '';