blob: 488accac3d8ee3050c7825ff79ca579a2ca74b29 (
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
|
<SELECT NAME="<% $opt{'name'} %>"<% $opt{'multiple'} ? ' MULTIPLE' : '' %>>
% while ( @fields ) {
% my $value = shift @fields;
% my $label = shift @fields;
<OPTION VALUE="<% $value %>"<% $curr_value{$value} ? ' SELECTED' : '' %>><% $label %></OPTION>
% }
</SELECT>
<%init>
my %opt = @_;
my %curr_value = map { $_ => 1 } split(', ',$opt{'curr_value'});
my @fields;
push @fields, '', $opt{empty_label} if exists($opt{empty_label});
my $conf = new FS::Conf;
if ($conf->config('ticket_system') eq 'RT_Internal') {
push @fields, FS::TicketSystem->custom_fields(
lookuptype => $opt{lookuptype},
valuetype => $opt{valuetype},
);
}
</%init>
|