diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-05-17 10:48:16 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-05-28 15:36:25 +0100 |
commit | 8c8b62e2b3a8af1b1f6fafe4080296a3826b7c1e (patch) | |
tree | c9ee509ec26f7fc42a791da8335a49ec3061de35 /web/cobrands/bexley/js.js | |
parent | 62aa2a6c4a606a12795d43c8966af00cec1dc274 (diff) |
[Bexley] Stop private property dead animal reporting.
Diffstat (limited to 'web/cobrands/bexley/js.js')
-rw-r--r-- | web/cobrands/bexley/js.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/web/cobrands/bexley/js.js b/web/cobrands/bexley/js.js index 70c8ae255..580320325 100644 --- a/web/cobrands/bexley/js.js +++ b/web/cobrands/bexley/js.js @@ -130,5 +130,28 @@ fixmystreet.assets.add(labeled_defaults, { asset_item: 'street light' }); +// We need to trigger the below function on subcategory change also +$(function(){ + $("#problem_form").on("change.category", "#form_DALocation", function() { + $(fixmystreet).trigger('report_new:category_change', [ $('#form_category') ]); + }); +}); + +fixmystreet.message_controller.register_category({ + body: defaults.body, + category: function() { + var cat = $('#form_category').val(); + if (cat === 'Dead animal') { + var where = $('#form_DALocation').val(); + if (where === 'Garden' || where === 'Other private property') { + return true; + } + } + return false; + }, + keep_category_extras: true, + message: 'Please follow the link below to pay to remove a dead animal from a private property.' +}); + })(); |