From 8cc48c6059d05fb54bf714aaddc168c8043e24ed Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Mon, 18 Jul 2016 19:29:59 -0500 Subject: RT#38973: Bill for time worked on ticket resolution [fully functional] --- httemplate/edit/part_pkg.cgi | 4 ++-- httemplate/elements/select-rt-queue.html | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 httemplate/elements/select-rt-queue.html (limited to 'httemplate') 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 @@ + +<%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(); + +} + + -- cgit v1.2.1