aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Admin.pm
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2018-05-15 14:10:43 +0100
committerDave Arter <davea@mysociety.org>2018-06-26 14:44:23 +0100
commitae0381e4e74f82cf55181f07528558e7df37443e (patch)
treed449442c45f79a3b0e5a01db9fb47d615ae09f6d /perllib/FixMyStreet/App/Controller/Admin.pm
parent7c009ce048fbe36db24dd1a24f3542503db2e898 (diff)
Enable editing of category group in admin
Fixes mysociety/fixmystreetforcouncils#275
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Admin.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index dfea6f8d4..35f619c11 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -356,6 +356,12 @@ sub update_contacts : Private {
if ( $c->get_param('reputation_threshold') ) {
$contact->set_extra_metadata( reputation_threshold => int($c->get_param('reputation_threshold')) );
}
+ if ( my $group = $c->get_param('group') ) {
+ $contact->set_extra_metadata( group => $group );
+ } else {
+ $contact->unset_extra_metadata( 'group' );
+ }
+
$c->forward('update_extra_fields', [ $contact ]);
$c->forward('contact_cobrand_extra_fields', [ $contact ]);