diff options
6 files changed, 8 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Council.pm b/perllib/FixMyStreet/App/Controller/Council.pm index 5d95c2538..ceec04027 100644 --- a/perllib/FixMyStreet/App/Controller/Council.pm +++ b/perllib/FixMyStreet/App/Controller/Council.pm @@ -69,6 +69,7 @@ sub load_and_check_areas : Private { type => $area_types ); } if ($all_areas->{error}) { + $c->stash->{location_error_mapit_error} = 1; $c->stash->{location_error} = $all_areas->{error}; return; } @@ -78,6 +79,7 @@ sub load_and_check_areas : Private { $c->cobrand->area_check( { all_areas => $all_areas }, $c->stash->{area_check_action} ); if ( !$success ) { + $c->stash->{location_error_cobrand_check} = 1; $c->stash->{location_error} = $error_msg; return; } @@ -87,6 +89,7 @@ sub load_and_check_areas : Private { # If we don't have any areas we can't accept the report if ( !scalar keys %$all_areas ) { + $c->stash->{location_error_no_areas} = 1; $c->stash->{location_error} = _('That location does not appear to be covered by a council; perhaps it is offshore or outside the country. Please try again.'); return; } diff --git a/perllib/FixMyStreet/App/Controller/Location.pm b/perllib/FixMyStreet/App/Controller/Location.pm index f103ff7f9..4312b6911 100644 --- a/perllib/FixMyStreet/App/Controller/Location.pm +++ b/perllib/FixMyStreet/App/Controller/Location.pm @@ -103,6 +103,7 @@ sub determine_location_from_pc : Private { } # pass errors back to the template + $c->stash->{location_error_pc_lookup} = 1; $c->stash->{location_error} = $error; return; } diff --git a/templates/web/default/around/around_index.html b/templates/web/default/around/around_index.html index a143e90a2..087abf65f 100644 --- a/templates/web/default/around/around_index.html +++ b/templates/web/default/around/around_index.html @@ -6,7 +6,7 @@ [% INCLUDE 'around/postcode_form.html' %] [% IF location_error %] - <p class="error">[% location_error %]</p> + [% INCLUDE 'around/location_error.html' %] [% END %] [% IF possible_location_matches %] diff --git a/templates/web/default/around/location_error.html b/templates/web/default/around/location_error.html new file mode 100644 index 000000000..9b907b64b --- /dev/null +++ b/templates/web/default/around/location_error.html @@ -0,0 +1 @@ +<p class="error">[% location_error %]</p> diff --git a/templates/web/fixmystreet/around/around_index.html b/templates/web/fixmystreet/around/around_index.html index c547b7ba9..0d9d35171 100644 --- a/templates/web/fixmystreet/around/around_index.html +++ b/templates/web/fixmystreet/around/around_index.html @@ -9,7 +9,7 @@ %] [% IF location_error %] - <p class="form-error">[% location_error %]</p> + [% INCLUDE 'around/location_error.html' %] [% END %] [% IF possible_location_matches %] diff --git a/templates/web/fixmystreet/around/location_error.html b/templates/web/fixmystreet/around/location_error.html new file mode 100644 index 000000000..fc9b2b8ce --- /dev/null +++ b/templates/web/fixmystreet/around/location_error.html @@ -0,0 +1 @@ +<p class="form-error">[% location_error %]</p> |