aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Questionnaire.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2015-02-19 17:46:06 +0000
committerMatthew Somerville <matthew@mysociety.org>2015-02-19 18:25:50 +0000
commit44c62365da9cb25f9bd320650632a20a1e266229 (patch)
tree58ccae303685a753972edc0ea8d68f7ce6533cc3 /perllib/FixMyStreet/App/Controller/Questionnaire.pm
parentee386f44aeebe7814f258b3ba4a756e903c89719 (diff)
Add URLs for easy looking at confirmation pages.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Questionnaire.pm')
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Questionnaire.pm11
1 files changed, 9 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Questionnaire.pm b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
index e75bb05ab..f6cc33e74 100755
--- a/perllib/FixMyStreet/App/Controller/Questionnaire.pm
+++ b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
@@ -67,9 +67,16 @@ token), or the mini own-report one (when we'll have a problem ID).
sub submit : Path('submit') {
my ( $self, $c ) = @_;
- if ( $c->req->params->{token} ) {
+ if (my $token = $c->req->params->{token}) {
+ if ($token eq '_test_') {
+ $c->stash->{been_fixed} = $c->req->params->{been_fixed};
+ $c->stash->{new_state} = $c->req->params->{new_state};
+ $c->stash->{template} = 'questionnaire/completed.html';
+ return;
+ }
$c->forward('submit_standard');
- } elsif ( $c->req->params->{problem} ) {
+ } elsif (my $p = $c->req->params->{problem}) {
+ $c->detach('creator_fixed') if $p eq '_test_';
$c->forward('submit_creator_fixed');
} else {
$c->detach( '/page_error_404_not_found' );