[Rt-commit] rt branch, 4.2/quickcreate-reload, created. rt-4.2.13-53-g6b312aa
Dustin Collins
strega at bestpractical.com
Sun Sep 4 00:45:41 EDT 2016
The branch, 4.2/quickcreate-reload has been created
at 6b312aa3476ea80af45730a72eaff611cb6a3aad (commit)
- Log -----------------------------------------------------------------
commit 6b312aa3476ea80af45730a72eaff611cb6a3aad
Author: Dustin Collins <strega at bestpractical.com>
Date: Sun Sep 4 00:45:34 2016 -0400
Use javascript to submit ticket QuickCreate form
Using QuickCreate from any dashboard takes users back to 'RT at a glance'.
In order to keep users in their current dashboard, javascript was added to handle form submission and then reload the current page.
Fixes I#25573
diff --git a/share/html/Elements/QuickCreate b/share/html/Elements/QuickCreate
index be25b8d..5c681c1 100644
--- a/share/html/Elements/QuickCreate
+++ b/share/html/Elements/QuickCreate
@@ -80,6 +80,18 @@
</&>
</div>
+<script type="text/javascript">
+ jQuery(function () {
+ var $form = jQuery('form');
+ $form.submit(function(){
+ jQuery.post(jQuery(this).attr('action'), jQuery(this).serialize(), function(response){
+ window.location = window.location;
+ });
+ return false;
+ });
+ });
+</script>
+
<%INIT>
my $args = delete $session{QuickCreate} || {};
</%INIT>
-----------------------------------------------------------------------
More information about the rt-commit
mailing list