From 849a709d89e78bec1ab19997b75de1b574969f1f Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 20 Apr 2011 21:17:28 +0000 Subject: [PATCH] fix agent type condition, RT#12539 --- httemplate/elements/tr-select-agent_type.html | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/httemplate/elements/tr-select-agent_type.html b/httemplate/elements/tr-select-agent_type.html index 1b0dfd445..3fcbcd388 100644 --- 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 ) { - - - -% } else { +%#% if ( scalar(@agent_types) == 1 ) { +%# +%# +%# +%#% } else { <% $opt{'label'} || 'Agent Type' %> <% include( '/elements/select-agent_type.html', 'curr_value' => $typenum, - 'agent_types' => \@agent_types, %opt, ) %> -% } +%#% } <%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'}; #? -- 2.11.0