aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2015-02-20 11:24:32 +0000
committerMatthew Somerville <matthew@mysociety.org>2015-02-20 11:24:32 +0000
commit834d18012ab64e340d06f539fee17d34e0cf7675 (patch)
tree6478756405efd2a2c04b3bc9d490d396c9112d0f /perllib/FixMyStreet/App/Controller/Report
parent7b227dea1532f3e68c369d8447611349e8cb44b6 (diff)
parent25d518e794b7d95525edaa9357adec48a4172c24 (diff)
Merge branch '972-completion-adverts'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm21
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/Update.pm7
2 files changed, 6 insertions, 22 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index ebc5cc6a0..5021d90e0 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -1132,23 +1132,10 @@ sub redirect_or_confirm_creation : Private {
if ( $report->confirmed ) {
# Subscribe problem reporter to email updates
$c->forward( 'create_reporter_alert' );
- my $report_uri;
-
- if ( $c->cobrand->moniker eq 'fixmybarangay' && $c->user->from_body && $c->stash->{external_source_id}) {
- $report_uri = $c->uri_for( '/report', $report->id, undef, { external_source_id => $c->stash->{external_source_id} } );
- } elsif ( $c->cobrand->never_confirm_reports && $report->non_public ) {
- $c->log->info( 'cobrand was set to always confirm reports and report was non public, success page showed');
- $c->stash->{template} = 'report_created.html';
- return 1;
- } else {
- $report_uri = $c->cobrand->base_url_for_report( $report ) . $report->url;
- }
- $c->log->info($report->user->id . ' was logged in, redirecting to /report/' . $report->id);
- if ( $c->sessionid ) {
- $c->flash->{created_report} = 'loggedin';
- }
- $c->res->redirect($report_uri);
- $c->detach;
+ $c->log->info($report->user->id . ' was logged in, showing confirmation page for ' . $report->id);
+ $c->stash->{created_report} = 'loggedin';
+ $c->stash->{template} = 'tokens/confirm_problem.html';
+ return 1;
}
# otherwise create a confirm token and email it to them.
diff --git a/perllib/FixMyStreet/App/Controller/Report/Update.pm b/perllib/FixMyStreet/App/Controller/Report/Update.pm
index b97420238..f1a1aa821 100644
--- a/perllib/FixMyStreet/App/Controller/Report/Update.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/Update.pm
@@ -376,11 +376,8 @@ sub redirect_or_confirm_creation : Private {
if ( $update->confirmed ) {
$c->forward( 'update_problem' );
$c->forward( 'signup_for_alerts' );
-
- my $report_uri = $c->cobrand->base_url_for_report( $update->problem ) . $update->problem->url;
- $c->flash->{comment_created} = 1;
- $c->res->redirect($report_uri);
- $c->detach;
+ $c->stash->{template} = 'tokens/confirm_update.html';
+ return 1;
}
# otherwise create a confirm token and email it to them.