[freeside-commits] freeside/httemplate/view/cust_main tickets.html, 1.13, 1.14
Mark Wells
mark at wavetail.420.am
Thu Jul 15 20:10:01 PDT 2010
- Previous message: [freeside-commits] freeside/FS FS.pm, 1.53.2.5, 1.53.2.6 MANIFEST, 1.143.2.15, 1.143.2.16
- Next message: [freeside-commits] freeside/FS/FS AccessRight.pm, 1.53, 1.54 cust_main.pm, 1.524, 1.525 Record.pm, 1.204, 1.205 cust_tag.pm, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main
In directory wavetail.420.am:/tmp/cvs-serv11373
Modified Files:
tickets.html
Log Message:
adjust "Create Ticket" link, RT#7656
Index: tickets.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/tickets.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -w -d -r1.13 -r1.14
--- tickets.html 11 Mar 2010 03:27:37 -0000 1.13
+++ tickets.html 16 Jul 2010 03:09:59 -0000 1.14
@@ -1,19 +1,27 @@
-<FORM METHOD="GET" ACTION="<% $new_base %>" NAME="CreateTicketForm">
-<INPUT TYPE="submit" VALUE="Create new ticket">
+<FORM METHOD="GET" NAME="CreateTicketForm" STYLE="display:inline">
+<SCRIPT TYPE="text/javascript">
+function updateTicketLink() {
+ var link = document.getElementById('CreateTicketLink');
+ var selector = document.getElementById('Queue')
+ link.href = "<% $new_base.'?'.
+ join(';', map(
+ { ($_ eq 'Queue') ? () : "$_=$new_param{$_}"}
+ keys %new_param),'Queue=') %>" + selector.options[selector.selectedIndex].value;
+}
+</SCRIPT>
+<A id="CreateTicketLink" HREF="">Create new ticket</A>
in queue
-<SELECT NAME="Queue">
+<SELECT NAME="Queue" id="Queue" onchange="updateTicketLink()">
% my %queues = FS::TicketSystem->queues();
-% foreach my $queueid ( keys %queues ) {
+% 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 %>"
<% $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>
+<SCRIPT DEFER TYPE="text/javascript">updateTicketLink();</SCRIPT>
<BR>
(<A HREF="<% $open_link %>">View <% $openlabel %> tickets for this customer</A>)
- Previous message: [freeside-commits] freeside/FS FS.pm, 1.53.2.5, 1.53.2.6 MANIFEST, 1.143.2.15, 1.143.2.16
- Next message: [freeside-commits] freeside/FS/FS AccessRight.pm, 1.53, 1.54 cust_main.pm, 1.524, 1.525 Record.pm, 1.204, 1.205 cust_tag.pm, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list