aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-05-24 17:41:48 +0100
committerStruan Donald <struan@exo.org.uk>2011-05-24 17:41:48 +0100
commit02de04c365b8d7e8323e556b6258c1c92ba672e6 (patch)
tree6d057fa6064cce7c42bff28f2d2c27c0fa48eb65 /perllib/FixMyStreet/App/Controller
parent75508655346c12cb56c3e2ae521ed8919f228a9e (diff)
if the person who created the problem is marking it as fixed show
them a questionnaire directly ( no submission yet )
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Questionnaire.pm8
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/Update.pm16
2 files changed, 14 insertions, 10 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Questionnaire.pm b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
index c5258e7d0..8b804e421 100755
--- a/perllib/FixMyStreet/App/Controller/Questionnaire.pm
+++ b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
@@ -215,6 +215,14 @@ sub display : Private {
$c->stash->{cobrand_form_elements} = $c->cobrand->form_elements('questionnaireForm');
}
+sub creator_fixed : Private {
+ my ( $self, $c ) = @_;
+
+ $c->stash->{template} = 'questionnaire/creator_fixed.html';
+
+ return 1;
+}
+
=head1 AUTHOR
Matthew Somerville
diff --git a/perllib/FixMyStreet/App/Controller/Report/Update.pm b/perllib/FixMyStreet/App/Controller/Report/Update.pm
index 3d575f6a5..350024315 100644
--- a/perllib/FixMyStreet/App/Controller/Report/Update.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/Update.pm
@@ -46,6 +46,8 @@ sub confirm : Private {
sub update_problem : Private {
my ( $self, $c ) = @_;
+ my $display_questionnaire = 0;
+
my $update = $c->stash->{update};
my $problem = $c->stash->{problem} || $update->problem;
@@ -54,8 +56,7 @@ sub update_problem : Private {
if ( $update->user->id == $problem->user->id ) {
$problem->send_questionnaire( 'f' );
- } else {
- $c->forward( 'ask_questionnaire' );
+ $display_questionnaire = 1;
}
}
@@ -64,14 +65,9 @@ sub update_problem : Private {
$c->stash->{problem} = $problem;
-
- return 1;
-}
-
-sub ask_questionnaire : Private {
- my ( $self, $c ) = @_;
-
- # FIXME send out questionnaire token here
+ if ( $display_questionnaire ) {
+ $c->detach('/questionnaire/creator_fixed');
+ }
return 1;
}