diff options
author | mark <mark> | 2010-07-22 23:33:30 +0000 |
---|---|---|
committer | mark <mark> | 2010-07-22 23:33:30 +0000 |
commit | 8c2973184d9e8e357f433b7380c7884454cc0293 (patch) | |
tree | 793a2d5af8d60494d3ca6abcd5d430445ce6f99d | |
parent | cbc36fe3a65f4713239611a0dffd8afa0de3c46e (diff) |
option to force default queue for new tickets in cust_main, RT#8889
-rw-r--r-- | FS/FS/Conf.pm | 7 | ||||
-rw-r--r-- | httemplate/view/cust_main/tickets.html | 13 |
2 files changed, 16 insertions, 4 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index acbd229d5..0d891be25 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -2251,7 +2251,12 @@ and customer address. Include units.', } }, }, - + { + 'key' => 'ticket_system-force_default_queueid', + 'section' => '', + 'description' => 'Disallow queue selection when creating new tickets from customer view.', + 'type' => 'checkbox', + }, { 'key' => 'ticket_system-selfservice_queueid', 'section' => '', diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html index 7a511a962..e90ae5276 100644 --- a/httemplate/view/cust_main/tickets.html +++ b/httemplate/view/cust_main/tickets.html @@ -9,10 +9,15 @@ function updateTicketLink() { keys %new_param),'Queue=') %>" + selector.options[selector.selectedIndex].value; } </SCRIPT> -<A id="CreateTicketLink" HREF="">Create new ticket</A> +<A id="CreateTicketLink" HREF="<% $new_link %>">Create new ticket</A> in queue -<SELECT NAME="Queue" id="Queue" onchange="updateTicketLink()"> % my %queues = FS::TicketSystem->queues(); +% if( $conf->exists('ticket_system-force_default_queueid') ) { +<B><% $queues{$new_param{'Queue'}} %></B> +<INPUT TYPE="hidden" NAME="Queue" VALUE="<% $new_param{'Queue'} %>"> +% } +% else { +<SELECT NAME="Queue" id="Queue" onchange="updateTicketLink()"> % foreach my $queueid ( sort { $queues{$a} cmp $queues{$b} } keys %queues ) { % #should consider whether the user has ACL to create ticket in each queue <OPTION VALUE="<% $queueid %>" @@ -20,8 +25,9 @@ function updateTicketLink() { ><% $queues{$queueid} |h %> % } </SELECT> -</FORM> <SCRIPT DEFER TYPE="text/javascript">updateTicketLink();</SCRIPT> +% } +</FORM> <BR> (<A HREF="<% $open_link %>">View <% $openlabel %> tickets for this customer</A>) @@ -87,6 +93,7 @@ function updateTicketLink() { <%init> +my( $conf ) = new FS::Conf; my( $cust_main ) = @_; my( @tickets ) = $cust_main->tickets; |