aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/App/Controller/Moderate.pm18
1 files changed, 18 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Moderate.pm b/perllib/FixMyStreet/App/Controller/Moderate.pm
index 3b452e090..5ab4b940e 100644
--- a/perllib/FixMyStreet/App/Controller/Moderate.pm
+++ b/perllib/FixMyStreet/App/Controller/Moderate.pm
@@ -84,6 +84,7 @@ sub moderate_report : Chained('report') : PathPart('') : Args(0) {
$c->forward('moderate_boolean', [ 'anonymous', 'show_name' ]),
$c->forward('moderate_boolean', [ 'photo' ]),
$c->forward('moderate_location'),
+ $c->forward('moderate_category'),
$c->forward('moderate_extra');
# Deal with possible photo changes. If a moderate form uses a standard
@@ -269,6 +270,23 @@ sub moderate_location : Private {
return 'location';
}
+# No update left at present
+sub moderate_category : Private {
+ my ($self, $c) = @_;
+
+ return unless $c->get_param('category');
+
+ # The admin category editing needs to know all the categories etc
+ $c->forward('/admin/categories_for_point');
+
+ my $problem = $c->stash->{problem};
+ $c->forward( '/admin/report_edit_category', [ $problem, 1 ] );
+ # It might need to set_report_extras in future
+
+ $problem->update;
+ return 'category';
+}
+
sub update : Chained('report') : PathPart('update') : CaptureArgs(1) {
my ($self, $c, $id) = @_;
my $comment = $c->stash->{problem}->comments->find($id);