diff options
author | Struan Donald <struan@exo.org.uk> | 2020-04-20 15:35:38 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2020-04-29 10:09:29 +0100 |
commit | b03cd41bef71435bb9b4f7ce759366938e08f9d7 (patch) | |
tree | bc44a8c3ddbf5b93e884e3efe493cf738be7d1b2 /web | |
parent | e41476b0ab7307912f04dd9d876976c63f3076b9 (diff) |
[EastSussex] set the group to the optgroup label
Some categories are in multiple groups so pass back the optgroup label
so we can assign it to the correct group and category
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/eastsussex/assets.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/web/cobrands/eastsussex/assets.js b/web/cobrands/eastsussex/assets.js index a84ad11e9..eed03afbb 100644 --- a/web/cobrands/eastsussex/assets.js +++ b/web/cobrands/eastsussex/assets.js @@ -89,9 +89,19 @@ fixmystreet.assets.add(defaults, { "Filter Drain", "Gully and Catchpit" ] }, - asset_id_field: 'id', asset_item: 'drain', asset_category: ["Blocked Drain", "Broken Drain Cover", "Ditches", "Missing Drain Cover"] }); +// can have multiple group +$(function(){ + $("#problem_form").on("change.category", function() { + var group = ''; + if (OpenLayers.Util.indexOf(fixmystreet.bodies, 'East Sussex County Council') != -1 ) { + group = $('#form_category :selected').parent().attr('label'); + } + $('#form_group').val(group); + }); +}); + })(); |