X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-agent.html;h=04600fa8d9461290eebe1daa567c9644e15f1276;hb=dbf521cf2f1f1a05f4722006f339b2595c8ee70f;hp=9f2f76a6c0adc3b5ec4c1cdd068037f1adb4b487;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git
diff --git a/httemplate/elements/tr-select-agent.html b/httemplate/elements/tr-select-agent.html
index 9f2f76a6c..04600fa8d 100644
--- a/httemplate/elements/tr-select-agent.html
+++ b/httemplate/elements/tr-select-agent.html
@@ -22,24 +22,38 @@ Example:
);
%doc>
-% 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' %> |
-
- <% include( '/elements/select-agent.html',
+ | <% $opt{'label'} || emt('Agent') %>
+ | >
+ <& /elements/select-agent.html,
'curr_value' => $agentnum,
'agents' => \@agents,
%opt,
- )
- %>
+ &>
|
@@ -57,4 +71,6 @@ my @agents =
'viewall_right' => $opt{'viewall_right'},
);
+my $colspan = $opt{'colspan'} ? 'COLSPAN="'.$opt{'colspan'}.'"' : '';
+
%init>