[Rt-commit] rt branch, 4.2/quickcreate-reload, created. rt-4.2.13-53-gaa328c9

Dustin Collins strega at bestpractical.com
Sun Sep 4 02:47:14 EDT 2016


The branch, 4.2/quickcreate-reload has been created
        at  aa328c92a4f89297fe4ab8d64ce6e8ec62e4ee8a (commit)

- Log -----------------------------------------------------------------
commit aa328c92a4f89297fe4ab8d64ce6e8ec62e4ee8a
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..909759b 100644
--- a/share/html/Elements/QuickCreate
+++ b/share/html/Elements/QuickCreate
@@ -80,6 +80,20 @@
 </&>
 </div>
 
+% if ( RT->Config->Get('DisplayTicketAfterQuickCreate', $session{'CurrentUser'}) == 0 ) {
+<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