RT#38973: Bill for time worked on ticket resolution [checkpoint, not ready for backport]
[freeside.git] / httemplate / elements / select-rt-customfield.html
1 <SELECT NAME="<% $opt{'name'} %>"<% $opt{'multiple'} ? ' MULTIPLE' : '' %>>
2 % while ( @fields ) {
3 %   my $value = shift @fields;
4 %   my $label = shift @fields;
5 <OPTION VALUE="<% $value %>"<% $curr_value{$value} ? ' SELECTED' : '' %>><% $label %></OPTION>
6 % }
7 </SELECT>
8 <%init>
9 my %opt = @_;
10
11 my %curr_value = map { $_ => 1 } split(', ',$opt{'curr_value'});
12
13 my @fields;
14 push @fields, '', $opt{empty_label} if exists($opt{empty_label});
15
16 my $conf = new FS::Conf;
17
18 if ($conf->config('ticket_system') eq 'RT_Internal') {
19
20   push @fields, FS::TicketSystem->custom_fields(
21     lookuptype => $opt{lookuptype},
22     valuetype  => $opt{valuetype},
23   );
24
25 }
26
27 </%init>