aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm7
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm10
2 files changed, 16 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index 641aad219..9e589b1f0 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -265,7 +265,12 @@ sub bodies : Path('bodies') : Args(0) {
sub body_form_dropdowns : Private {
my ( $self, $c ) = @_;
- my $areas = mySociety::MaPit::call('areas', $c->cobrand->area_types);
+ my $areas;
+ if ($c->cobrand->moniker eq 'zurich') {
+ $areas = mySociety::MaPit::call('areas', 274456);
+ } else {
+ $areas = mySociety::MaPit::call('areas', $c->cobrand->area_types);
+ }
$c->stash->{areas} = [ sort { strcoll($a->{name}, $b->{name}) } values %$areas ];
my @methods = map { $_ =~ s/FixMyStreet::SendReport:://; $_ } keys %{ FixMyStreet::SendReport->get_senders };
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index b4d2b8ecc..2cd2688fd 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -22,4 +22,14 @@ sub uri {
return $uri;
}
+sub remove_redundant_areas {
+ my $self = shift;
+ my $all_areas = shift;
+
+ # Remove all except Zurich
+ foreach (keys %$all_areas) {
+ delete $all_areas->{$_} unless $_ eq 274456;
+ }
+}
+
1;