summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2016-07-18 19:29:59 -0500
committerJonathan Prykop <jonathan@freeside.biz>2016-07-18 19:29:59 -0500
commit8cc48c6059d05fb54bf714aaddc168c8043e24ed (patch)
treec7594507d24b71ce8887fe1ed22eaecd1a751d43 /httemplate
parentfe25108857542f5d7c460ab831bc782f608179fa (diff)
RT#38973: Bill for time worked on ticket resolution [fully functional]
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/edit/part_pkg.cgi4
-rw-r--r--httemplate/elements/select-rt-queue.html24
2 files changed, 26 insertions, 2 deletions
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index 2c8477d8e..7fe659f94 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -988,9 +988,9 @@ my $html_bottom = sub {
: ''
). '>';
- } elsif ( $href->{$field}{'type'} eq 'select-rt-customfield' ) {
+ } elsif ( $href->{$field}{'type'} =~ /^select-rt-/ ) {
- $html .= include('/elements/select-rt-customfield.html',
+ $html .= include('/elements/'.$href->{$field}{'type'}.'.html',
'name' => $layer.'__'.$field,
'curr_value' => $options{$field},
map { $_ => $href->{$field}{$_} }
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>