blob: 1b0dfd445d313433c6ce0db1d50bab103a0a8d0a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
% 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,
'agent_types' => \@agent_types,
%opt,
)
%>
</TD>
</TR>
% }
<%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;
}
</%init>
|