aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/BathNES.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Borsetshire.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Buckinghamshire.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm12
-rw-r--r--perllib/FixMyStreet/Cobrand/FixMyStreet.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Lincolnshire.pm1
-rw-r--r--perllib/FixMyStreet/Cobrand/Northamptonshire.pm2
8 files changed, 13 insertions, 12 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 6a6040865..eb7934da3 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -741,7 +741,7 @@ sub setup_categories_and_bodies : Private {
$c->stash->{missing_details_bodies} = \@missing_details_bodies;
$c->stash->{missing_details_body_names} = \@missing_details_body_names;
- if ( $c->cobrand->call_hook('enable_category_groups') ) {
+ if ( $c->cobrand->enable_category_groups ) {
my %category_groups = ();
for my $category (@category_options) {
my $group = $category->{group} // $category->get_extra_metadata('group') // '';
diff --git a/perllib/FixMyStreet/Cobrand/BathNES.pm b/perllib/FixMyStreet/Cobrand/BathNES.pm
index d726c671e..ea9b26e7a 100644
--- a/perllib/FixMyStreet/Cobrand/BathNES.pm
+++ b/perllib/FixMyStreet/Cobrand/BathNES.pm
@@ -74,8 +74,6 @@ sub pin_colour {
sub send_questionnaires { 0 }
-sub enable_category_groups { 1 }
-
sub default_map_zoom { 3 }
sub map_js_extra {
diff --git a/perllib/FixMyStreet/Cobrand/Borsetshire.pm b/perllib/FixMyStreet/Cobrand/Borsetshire.pm
index a99d2e7b4..f8650169d 100644
--- a/perllib/FixMyStreet/Cobrand/Borsetshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Borsetshire.pm
@@ -27,6 +27,4 @@ sub send_questionnaires {
sub bypass_password_checks { 1 }
-sub enable_category_groups { 1 }
-
1;
diff --git a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
index 486e9603d..4c1d0108b 100644
--- a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
@@ -185,8 +185,6 @@ sub map_type { 'Buckinghamshire' }
sub default_map_zoom { 3 }
-sub enable_category_groups { 1 }
-
sub _dashboard_export_add_columns {
my $self = shift;
my $c = $self->{c};
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index cc7f03adb..225ab50d7 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -1085,6 +1085,18 @@ sub show_unconfirmed_reports {
0;
}
+=item enable_category_groups
+
+Whether body category groups should be displayed on the new report form. If this is
+not enabled then any groups will be ignored and a flat list of categories displayed.
+
+=cut
+
+sub enable_category_groups {
+ my $self = shift;
+ return $self->feature('category_groups');
+}
+
sub default_problem_state { 'unconfirmed' }
sub state_groups_admin {
diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
index e01f3e23b..7c51eddd1 100644
--- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
+++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
@@ -10,8 +10,6 @@ use constant COUNCIL_ID_BROMLEY => 2482;
sub on_map_default_status { return 'open'; }
-sub enable_category_groups { 1 }
-
# Special extra
sub path_to_web_templates {
my $self = shift;
diff --git a/perllib/FixMyStreet/Cobrand/Lincolnshire.pm b/perllib/FixMyStreet/Cobrand/Lincolnshire.pm
index 3b731b273..ca88f6b8e 100644
--- a/perllib/FixMyStreet/Cobrand/Lincolnshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Lincolnshire.pm
@@ -18,7 +18,6 @@ sub council_name { return 'Lincolnshire County Council'; }
sub council_url { return 'lincolnshire'; }
sub is_two_tier { 1 }
-sub enable_category_groups { 1 }
sub send_questionnaires { 0 }
sub report_sent_confirmation_email { 'external_id' }
diff --git a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
index 3d5d4b6f2..21a145326 100644
--- a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
@@ -47,8 +47,6 @@ sub privacy_policy_url {
'https://www3.northamptonshire.gov.uk/councilservices/council-and-democracy/transparency/information-policies/privacy-notice/place/Pages/street-doctor.aspx'
}
-sub enable_category_groups { 1 }
-
sub is_two_tier { 1 }
sub get_geocoder { 'OSM' }