projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1b59bf2
)
fix agent type condition, RT#12539
author
ivan
<ivan>
Wed, 20 Apr 2011 21:17:28 +0000
(21:17 +0000)
committer
ivan
<ivan>
Wed, 20 Apr 2011 21:17:28 +0000
(21:17 +0000)
httemplate/elements/tr-select-agent_type.html
patch
|
blob
|
history
diff --git
a/httemplate/elements/tr-select-agent_type.html
b/httemplate/elements/tr-select-agent_type.html
index
1b0dfd4
..
3fcbcd3
100644
(file)
--- a/
httemplate/elements/tr-select-agent_type.html
+++ b/
httemplate/elements/tr-select-agent_type.html
@@
-1,39
+1,27
@@
-% if ( scalar(@agent_types) == 1 ) {
-
- <INPUT TYPE="hidden" NAME="<% $opt{'field'} || 'typenum' %>" VALUE="<% $agent_types[0]->typenum %>">
-
-% } else {
+%
#%
if ( scalar(@agent_types) == 1 ) {
+%#
+
%#
<INPUT TYPE="hidden" NAME="<% $opt{'field'} || 'typenum' %>" VALUE="<% $agent_types[0]->typenum %>">
+%#
+%
#%
} else {
<TR>
<TD ALIGN="right"><% $opt{'label'} || 'Agent Type' %></TD>
<TD>
<% include( '/elements/select-agent_type.html',
'curr_value' => $typenum,
<TR>
<TD ALIGN="right"><% $opt{'label'} || 'Agent Type' %></TD>
<TD>
<% include( '/elements/select-agent_type.html',
'curr_value' => $typenum,
- 'agent_types' => \@agent_types,
%opt,
)
%>
</TD>
</TR>
%opt,
)
%>
</TD>
</TR>
-% }
+%
#%
}
<%init>
my %opt = @_;
my $typenum = $opt{'curr_value'} || $opt{'value'};
<%init>
my %opt = @_;
my $typenum = $opt{'curr_value'} || $opt{'value'};
-my @agent_types = ();
-if ( $opt{'agent_types'} ) {
- #@agents = @{ $opt{'agents'} };
-
- #here is the agent virtualization
-# my $agentnums_href = $FS::CurrentUser::CurrentUser->agentnums_href;
-# @agent_types = grep $agentnums_href->{$_->agentnum}, @{ $opt{'agent_types'} };
-
- delete $opt{'agent_types'};
-} else {
-# @agents = $FS::CurrentUser::CurrentUser->agents;
-}
+delete $opt{'agent_types'} if $opt{'agent_types'}; #?
</%init>
</%init>