-%
-% my( $cust_main ) = @_;
-%
-% my $conf = new FS::Conf;
-% my $num = $conf->config('cust_main-max_tickets') || 10;
-%
-% my @tickets = ();
-% unless ( $conf->config('ticket_system-custom_priority_field') ) {
-%
-% @tickets =
-% @{ FS::TicketSystem->customer_tickets($cust_main->custnum, $num) };
-%
-% } else {
-%
-% foreach my $priority (
-% $conf->config('ticket_system-custom_priority_field-values'), ''
-% ) {
-% last if scalar(@tickets) >= $num;
-% push @tickets,
-% @{ FS::TicketSystem->customer_tickets( $cust_main->custnum,
-% $num - scalar(@tickets),
-% $priority,
-% )
-% };
-% }
-%
-% }
-%
-%
-
-<A NAME="tickets"><FONT SIZE="+2">Tickets</FONT></A>
+<FORM METHOD="GET" ACTION="<% $new_base %>" NAME="CreateTicketForm">
+<INPUT TYPE="submit" VALUE="Create new ticket">
+in queue
+<SELECT NAME="Queue">
+% my %queues = FS::TicketSystem->queues();
+% foreach my $queueid ( keys %queues ) {
+% #should consider whether the user has ACL to create ticket in each queue
+ <OPTION VALUE="<% $queueid %>"
+ <% $queueid == $new_param{'Queue'} ? 'SELECTED' : '' %>
+ ><% $queues{$queueid} |h %>
+% }
+</SELECT>
+% foreach my $param ( grep { $_ ne 'Queue' } keys %new_param ) {
+ <INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $new_param{$param} |h %>">
+% }
+</FORM>