[Rt-commit] r11177 - in rtir/branches/2.3-EXPERIMENTAL/html/RTIR: .
ruz at bestpractical.com
ruz at bestpractical.com
Mon Mar 24 23:25:53 EDT 2008
Author: ruz
Date: Mon Mar 24 23:25:53 2008
New Revision: 11177
Modified:
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Advanced.html
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Display.html
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Create.html
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Merge.html
Log:
* use redirect instead $m->comp
* move away from using results arg in Display.html
Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Advanced.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Advanced.html (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Advanced.html Mon Mar 24 23:25:53 2008
@@ -75,8 +75,11 @@
push @results, ProcessTicketBasics( TicketObj => $Ticket, ARGSRef => \%ARGS);
push @results, ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS);
- if ( RT->Config->Get('DisplayAfterEdit', $session{'CurrentUser'}) ) {
- $m->comp("/RTIR/Display.html", results => [@results], %ARGS);
+ if ( RT->Config->Get('DisplayAfterEdit', $session{'CurrentUser'}) ) {
+ push @{ $session{"Actions"} ||= [] }, @results;
+ $session{'i'}++;
+
+ $m->comp("/RTIR/Display.html", %ARGS);
return;;
}
}
Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Display.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Display.html (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Display.html Mon Mar 24 23:25:53 2008
@@ -304,9 +304,19 @@
}
Abort("No permission to view ticket");
}
+
# update id argument in the case we took merged or created new
$ARGS{'id'} = $id = $Ticket->Id;
+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.
+ push @{ $session{"Actions"} ||= [] }, @results;
+ $session{'i'}++;
+ RT::Interface::Web::Redirect( RT->Config->Get('WebURL') ."RTIR/Display.html?id=". $id );
+}
+
if ( $Type eq 'Report' ) {
$name = "Incident Report";
} else {
Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Create.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Create.html (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Create.html Mon Mar 24 23:25:53 2008
@@ -294,7 +294,9 @@
if( $inc_obj ) {
$m->callback(CallbackName => 'BeforeDisplay', ARGSRef => \%ARGS, Child => $ChildObj);
- return $m->comp('Display.html', id => $inc_obj->id, results => \@results );
+ push @{ $session{"Actions"} ||= [] }, @results;
+ $session{'i'}++;
+ RT::Interface::Web::Redirect( RT->Config->Get('WebURL') ."RTIR/Incident/Display.html?id=". $inc_obj->id );
}
}
Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Merge.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Merge.html (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Merge.html Mon Mar 24 23:25:53 2008
@@ -113,7 +113,10 @@
push @results, ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS);
$Ticket = LoadTicket($id);
- return $m->comp('/RTIR/Display.html', id => $Ticket->id, results => \@results );
+
+ push @{ $session{"Actions"} ||= [] }, @results;
+ $session{'i'}++;
+ RT::Interface::Web::Redirect( RT->Config->Get('WebURL') ."RTIR/Display.html?id=". $Ticket->id );
}
my $Type = RT::IR::TicketType( Ticket => $Ticket );
More information about the Rt-commit
mailing list