diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-04-02 09:12:33 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-04-02 09:13:26 +0100 |
commit | 371874518b6e2a8e41fa38bcf2a8276a41d7323c (patch) | |
tree | 9ef81f9bc468457e2cba84a09079746071279db1 /web | |
parent | 2b8794c9026fc4ec23d4ff795105ecfcaa759772 (diff) |
[Highways England] Hide messaging if not Area 7.
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/highwaysengland/assets.js | 12 |
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) { |