% if ( scalar(@agents) == 1 ) {
%# YUCK. empty row so we don't throw g_row in edit.html off :/
% } else {
<% $opt{'label'} || 'Agent' %> |
<% include( '/elements/select-agent.html',
'curr_value' => $agentnum,
'agents' => \@agents,
%opt,
)
%>
|
% }
<%init>
my %opt = @_;
my $agentnum = $opt{'curr_value'} || $opt{'value'};
my @agents = $opt{'agents'}
? @{ $opt{'agents'} }
: $FS::CurrentUser::CurrentUser->agents;
%init>