aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2020-03-27 10:59:15 +0000
committerStruan Donald <struan@exo.org.uk>2020-03-31 09:58:58 +0100
commit6e07f9477d0218151f80a181c7832fe73c6accac (patch)
tree3237052afd757cc01801b765fb4c40919e62c47a /perllib/FixMyStreet
parent2187335bcd3fff4e0199e25d381d9f9d865e85c9 (diff)
[Highways England] Error if road name searched.
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/Cobrand/HighwaysEngland.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/HighwaysEngland.pm b/perllib/FixMyStreet/Cobrand/HighwaysEngland.pm
index ee4754827..87cf073eb 100644
--- a/perllib/FixMyStreet/Cobrand/HighwaysEngland.pm
+++ b/perllib/FixMyStreet/Cobrand/HighwaysEngland.pm
@@ -43,6 +43,18 @@ sub example_places {
return $self->feature('example_places') || $self->next::method();
}
+sub geocode_postcode {
+ my ( $self, $s ) = @_;
+
+ if ($s =~ /^\s*[AM]\d+\s*$/i) {
+ return {
+ error => "Please be more specific about the location of the issue, eg M1, Jct 16 or A5, Towcester"
+ };
+ }
+
+ return $self->next::method($s);
+}
+
sub allow_photo_upload { 0 }
sub allow_anonymous_reports { 'button' }