diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-09-03 15:37:38 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-09-04 17:51:40 +0100 |
commit | e90cf8b57f598cf5f7137c3fbd6e73d08560822f (patch) | |
tree | 1d1700419ca296dfb44e342d5f8dbcfa855646c1 | |
parent | a5c748ac0b14c58fe34fb93936f4f3b69e29f4ce (diff) |
[Westminster] Run stopper check after layer check.
The stopper check runs first, which could mean that if the asset layer
has not yet loaded, the form is disabled when it should not be (e.g. on
a TfL road in a road category). Make sure that we always run the stopper
check after the TfL layer check, in case it changes something.
-rw-r--r-- | web/cobrands/fixmystreet/assets.js | 2 | ||||
-rw-r--r-- | web/cobrands/westminster/assets.js | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js index 22ce06154..466ca3b40 100644 --- a/web/cobrands/fixmystreet/assets.js +++ b/web/cobrands/fixmystreet/assets.js @@ -1217,6 +1217,8 @@ fixmystreet.message_controller = (function() { stoppers = []; }, + check_for_stopper: check_for_stopper, + add_ignored_body: function(body) { ignored_bodies.push(body); } diff --git a/web/cobrands/westminster/assets.js b/web/cobrands/westminster/assets.js index e015f35a1..de6e7c4c6 100644 --- a/web/cobrands/westminster/assets.js +++ b/web/cobrands/westminster/assets.js @@ -104,9 +104,11 @@ fixmystreet.assets.add(defaults, { } else { fixmystreet.body_overrides.remove_only_send(); } + fixmystreet.message_controller.check_for_stopper(); }, not_found: function(layer) { fixmystreet.body_overrides.remove_only_send(); + fixmystreet.message_controller.check_for_stopper(); } } }); |