summaryrefslogtreecommitdiff
path: root/httemplate/elements/select-rt-queue.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2016-07-20 13:02:15 -0700
committerIvan Kohler <ivan@freeside.biz>2016-07-20 13:02:15 -0700
commitc22d84e565ab16db142395dce2e8621624eff140 (patch)
tree3670e2bc0bf200910c3af24e5459e8b6966a992b /httemplate/elements/select-rt-queue.html
parente9a7ae3aadab31f34c6bacb2376f817ecd4d7d8d (diff)
parentf235a64b4e96e8d613fb3ecdd3acc7f65f9f291d (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/elements/select-rt-queue.html')
-rw-r--r--httemplate/elements/select-rt-queue.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/httemplate/elements/select-rt-queue.html b/httemplate/elements/select-rt-queue.html
new file mode 100644
index 000000000..4ae8bc942
--- /dev/null
+++ b/httemplate/elements/select-rt-queue.html
@@ -0,0 +1,24 @@
+<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->queues();
+
+}
+
+</%init>