diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-04-09 13:25:38 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-04-09 13:25:38 -0700 |
commit | c6c8d0ffa48f07b5c1b7df7981bc28322d47cf70 (patch) | |
tree | 9cf9b55ae6f6faf31737800adc3282ddc0e6fb73 /httemplate/elements/select-ticketing_queueid.html | |
parent | 84abddf4bf0bc90e4a8f6e8e546e3cf4ee2786a2 (diff) |
installers, RT#16584
Diffstat (limited to 'httemplate/elements/select-ticketing_queueid.html')
-rw-r--r-- | httemplate/elements/select-ticketing_queueid.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/httemplate/elements/select-ticketing_queueid.html b/httemplate/elements/select-ticketing_queueid.html new file mode 100644 index 000000000..540b38de7 --- /dev/null +++ b/httemplate/elements/select-ticketing_queueid.html @@ -0,0 +1,33 @@ +<SELECT NAME="ticketing_queueid"> + + <OPTION VALUE="" <% ! $opt{curr_value} ? 'SELECTED' : '' %>><% $opt{empty_label} %> + +% foreach my $queueid ( sort { $a <=> $b } keys %queues ) { + <OPTION VALUE="<% $queueid %>" <% $opt{curr_value} == $queueid ? ' SELECTED' : '' %>><% $queueid %>: <% $queues{$queueid} %> +% } + +% while ( @post_options ) { +% my $post_opt = shift(@post_options); +% my $post_label = shift(@post_options); +% my $selected = ( $opt{curr_value} eq $post_opt ); + <OPTION VALUE="<% $post_opt %>" + <% $selected ? 'SELECTED' : '' %> + ><% $post_label %> +% } + +</SELECT> + +<%init> + +my %opt = @_; + +my $conf = new FS::Conf; + +my %queues = (); +if ( $conf->config('ticket_system') ) { + %queues = FS::TicketSystem->queues(); +} + +my @post_options = $opt{post_options} ? @{ $opt{post_options} } : (); + +</%init> |