diff options
author | Struan Donald <struan@exo.org.uk> | 2019-11-22 16:18:44 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2019-11-27 12:09:40 +0000 |
commit | 7ea719a848046c072472360c9d7f925721cead49 (patch) | |
tree | 87c11e5cda9012164e79ff29a778be7a239d1d50 /web | |
parent | fcdbece8844f9c3c50e2f430a12d0e9c5f5a2d45 (diff) |
[BANES] Only allow Damage to pavement reports on pavement
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/bathnes/assets.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/web/cobrands/bathnes/assets.js b/web/cobrands/bathnes/assets.js index aa06a6fbb..f508ca97c 100644 --- a/web/cobrands/bathnes/assets.js +++ b/web/cobrands/bathnes/assets.js @@ -206,11 +206,16 @@ fixmystreet.assets.add(fixmystreet.maps.banes_defaults, { asset_type: 'road', all_categories: true, // Not really, but want to allow on all but one, not stop no_asset_msg_id: '#js-not-a-road', + cat_map: { + 'Damage to pavement': 'pavement', + 'Damage to road': 'road' + }, actions: { found: fixmystreet.message_controller.road_found, not_found: function(layer) { var cat = $('select#form_category').val(); - if (cat === 'Damage to road') { + if (cat === 'Damage to pavement' || cat === 'Damage to road') { + layer.fixmystreet.asset_item = layer.fixmystreet.cat_map[cat]; fixmystreet.message_controller.road_not_found(layer); } else { fixmystreet.message_controller.road_found(layer); |