[Rt-commit] r6690 - in rt/branches/3.6-RELEASE/html: Ticket

ruz at bestpractical.com ruz at bestpractical.com
Fri Dec 22 19:23:37 EST 2006


Author: ruz
Date: Fri Dec 22 19:23:37 2006
New Revision: 6690

Modified:
   rt/branches/3.6-RELEASE/html/SelfService/Display.html
   rt/branches/3.6-RELEASE/html/Ticket/Display.html

Log:
* Copy rediect feature from Ticket/Display to SelfService/Display
  Thanks to doogles and Todd.

Modified: rt/branches/3.6-RELEASE/html/SelfService/Display.html
==============================================================================
--- rt/branches/3.6-RELEASE/html/SelfService/Display.html	(original)
+++ rt/branches/3.6-RELEASE/html/SelfService/Display.html	Fri Dec 22 19:23:37 2006
@@ -207,6 +207,19 @@
 
     # }}}
 
+    # This code does automatic redirection if any updates happen.
+
+    if (@results) {
+        # We've done something, so we need to clear the decks to avoid
+        # resubmission on refresh.
+        # But we need to store Actions somewhere too, so we don't lose them.
+        $session{"Actions"} = \@results;
+        RT::Interface::Web::Redirect($RT::WebURL."SelfService/Display.html?id="
+                                     . $Ticket->id);
+    } else {
+        @results = @{ delete $session{"Actions"} || [] };
+    }
+
     my $Transactions = $Ticket->Transactions;
 
     my $attachments =

Modified: rt/branches/3.6-RELEASE/html/Ticket/Display.html
==============================================================================
--- rt/branches/3.6-RELEASE/html/Ticket/Display.html	(original)
+++ rt/branches/3.6-RELEASE/html/Ticket/Display.html	Fri Dec 22 19:23:37 2006
@@ -163,8 +163,7 @@
     $session{"Actions"} = \@Actions;
     RT::Interface::Web::Redirect($RT::WebURL."Ticket/Display.html?id=".$TicketObj->id);
 } else {
-    @Actions = @{$session{"Actions"} || [] };
-    delete $session{"Actions"};
+    @Actions = @{ delete $session{"Actions"} || [] };
 }
 
 $m->comp('/Elements/Callback', _CallbackName => 'BeforeDisplay',


More information about the Rt-commit mailing list