aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-04-02 09:12:33 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-04-02 09:13:26 +0100
commit371874518b6e2a8e41fa38bcf2a8276a41d7323c (patch)
tree9ef81f9bc468457e2cba84a09079746071279db1 /web
parent2b8794c9026fc4ec23d4ff795105ecfcaa759772 (diff)
[Highways England] Hide messaging if not Area 7.
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/highwaysengland/assets.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/web/cobrands/highwaysengland/assets.js b/web/cobrands/highwaysengland/assets.js
index d8ba8b6ac..8e50ed396 100644
--- a/web/cobrands/highwaysengland/assets.js
+++ b/web/cobrands/highwaysengland/assets.js
@@ -63,9 +63,15 @@ fixmystreet.assets.add(defaults, {
found: function(layer, feature) {
// If the road isn't in area 7 then we want to show the not found message.
fixmystreet.message_controller.road_found(layer, feature, function(feature) {
- $('#js-top-message').show();
- $('#form_category_row').show();
- return feature.attributes.area_name === 'Area 7';
+ if (feature.attributes.area_name === 'Area 7') {
+ $('#js-top-message').show();
+ $('#form_category_row').show();
+ return true;
+ } else {
+ $('#js-top-message').hide();
+ $('#form_category_row').hide();
+ return false;
+ }
}, '#js-not-area7-road');
},
not_found: function(layer) {