diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/buckinghamshire/assets.js | 4 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/assets.js | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/web/cobrands/buckinghamshire/assets.js b/web/cobrands/buckinghamshire/assets.js index 1cf5b236c..699588d98 100644 --- a/web/cobrands/buckinghamshire/assets.js +++ b/web/cobrands/buckinghamshire/assets.js @@ -285,6 +285,8 @@ fixmystreet.assets.add(defaults, { }; var msg_id = map[feature.attributes.feature_ty] || '#js-not-council-road'; + fixmystreet.body_overrides.allow_send(layer.fixmystreet.body); + fixmystreet.body_overrides.remove_only_send(); fixmystreet.message_controller.road_found(layer, feature, function(feature) { if (OpenLayers.Util.indexOf(bucks_types, feature.attributes.feature_ty) != -1) { var cat = $('select#form_category').val(); @@ -303,6 +305,8 @@ fixmystreet.assets.add(defaults, { }, not_found: function(layer) { + fixmystreet.body_overrides.do_not_send(layer.fixmystreet.body); + fixmystreet.body_overrides.remove_only_send(); fixmystreet.message_controller.road_not_found(layer); // If flytipping is picked, we don't want to ask the extra question diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js index 46d3323e5..5a25cc128 100644 --- a/web/cobrands/fixmystreet/assets.js +++ b/web/cobrands/fixmystreet/assets.js @@ -1177,8 +1177,6 @@ fixmystreet.message_controller = (function() { // then you should pass in a criterion function to test the found feature, // plus an ID of the message to be shown road_found: function(layer, feature, criterion, msg_id) { - fixmystreet.body_overrides.allow_send(layer.fixmystreet.body); - fixmystreet.body_overrides.remove_only_send(); if (fixmystreet.assets.selectedFeature()) { responsibility_off(); } else if (!criterion || criterion(feature)) { @@ -1191,12 +1189,10 @@ fixmystreet.message_controller = (function() { } }, + // If a feature wasn't found at the location they've clicked, it's + // probably a field or something. Show an error to that effect, + // unless an asset is selected. road_not_found: function(layer) { - // If a feature wasn't found at the location they've clicked, it's - // probably a field or something. Show an error to that effect, - // unless an asset is selected. - fixmystreet.body_overrides.do_not_send(layer.fixmystreet.body); - fixmystreet.body_overrides.remove_only_send(); // don't show the message if clicking on a highways england road if (fixmystreet.body_overrides.get_only_send() == 'Highways England' || !layer.visibility) { responsibility_off(); |