aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/highwaysengland/assets.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/web/cobrands/highwaysengland/assets.js b/web/cobrands/highwaysengland/assets.js
index e8245e169..d8ba8b6ac 100644
--- a/web/cobrands/highwaysengland/assets.js
+++ b/web/cobrands/highwaysengland/assets.js
@@ -60,8 +60,19 @@ fixmystreet.assets.add(defaults, {
asset_type: 'road',
no_asset_msg_id: '#js-not-he-road',
actions: {
- found: fixmystreet.message_controller.road_found,
- not_found: fixmystreet.message_controller.road_not_found
+ 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';
+ }, '#js-not-area7-road');
+ },
+ not_found: function(layer) {
+ fixmystreet.message_controller.road_not_found(layer);
+ $('#js-top-message').hide();
+ $('#form_category_row').hide();
+ }
}
});