X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-agent.html;h=04600fa8d9461290eebe1daa567c9644e15f1276;hp=515a11d48c27e9f188ab930d8ba064852b34f3b5;hb=3f2a7b01b59902faed5767d81e2959e131bdbdfd;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984 diff --git a/httemplate/elements/tr-select-agent.html b/httemplate/elements/tr-select-agent.html index 515a11d48..04600fa8d 100644 --- a/httemplate/elements/tr-select-agent.html +++ b/httemplate/elements/tr-select-agent.html @@ -22,24 +22,38 @@ Example: ); -% if ( scalar(@agents) == 1 ) { - - - -%# YUCK. empty row so we don't throw g_row in edit.html off :/ - - +% if ( scalar(@agents) == 1 || $opt{'fixed'} ) { + + + +% if ( scalar(@agents) != 1 ) { + + <% $opt{'label'} || emt('Agent') %> + > +% my $agent = qsearchs('agent', { 'agentnum' => $agentnum }); + <% $agent ? $agent->agent : '(all)' |h %> + + + +% } else { # YUCK. empty row so we don't throw g_row in edit.html off :/ + + +% } +% % } else { - <% $opt{'label'} || 'Agent' %> + <% $opt{'label'} || emt('Agent') %> > - <% include( '/elements/select-agent.html', + <& /elements/select-agent.html, 'curr_value' => $agentnum, 'agents' => \@agents, %opt, - ) - %> + &>