summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-select-agent.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-05-15 18:25:37 -0700
committerIvan Kohler <ivan@freeside.biz>2012-05-15 18:25:37 -0700
commit49fc33db77d202f175a4d8a33e3eab1e52080a4d (patch)
tree9ce8e9a30a35ac581facf78479d4aee27fe89942 /httemplate/elements/tr-select-agent.html
parent1ae273f69e5bf2b46c9c5fcd990ad923770ace56 (diff)
read only access to message templates, RT#1`7477
Diffstat (limited to 'httemplate/elements/tr-select-agent.html')
-rw-r--r--httemplate/elements/tr-select-agent.html19
1 files changed, 15 insertions, 4 deletions
diff --git a/httemplate/elements/tr-select-agent.html b/httemplate/elements/tr-select-agent.html
index ce03c40..321bd6b 100644
--- a/httemplate/elements/tr-select-agent.html
+++ b/httemplate/elements/tr-select-agent.html
@@ -22,7 +22,7 @@ Example:
);
</%doc>
-% if ( scalar(@agents) == 1 ) {
+% if ( scalar(@agents) == 1 || $opt{'fixed'} ) {
<INPUT TYPE = "hidden"
NAME = "<% $opt{'field'} || 'agentnum' %>"
@@ -30,9 +30,20 @@ Example:
VALUE = "<% $agents[0]->agentnum %>"
>
-%# YUCK. empty row so we don't throw g_row in edit.html off :/
- <TR>
- </TR>
+% if ( scalar(@agents) != 1 ) {
+ <TR>
+ <TD ALIGN="right"><% $opt{'label'} || emt('Agent') %></TD>
+ <TD BGCOLOR="#dddddd" <% $colspan %>>
+% my $agent = qsearchs('agent', { 'agentnum' => $agentnum });
+ <% $agent ? $agent->agent : '(all)' |h %>
+ </TD>
+ </TR>
+
+% } else { # YUCK. empty row so we don't throw g_row in edit.html off :/
+ <TR>
+ </TR>
+% }
+%
% } else {
<TR>