aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Questionnaire.pm
diff options
context:
space:
mode:
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' );