diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-07-06 14:04:23 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-07-07 09:14:38 +0100 |
commit | c93ebfa26b864c26b9219b59f6676371e434ea0a (patch) | |
tree | 10f06ab20e600571ad3ad0556aeeeb1980799986 /web | |
parent | 5fc8fc8eadc4abfb207df423169d179c6d9c922a (diff) |
[Oxfordshire] Separate defect creation from state.
Revert the behaviour from 36baff2d, so that everyone can use the 'action
scheduled' state, and instead if someone with report_instruct permission
has the state set to 'action scheduled', add an extra mandatory question
asking whether they want to raise a defect or not.
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet/staff.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/web/cobrands/fixmystreet/staff.js b/web/cobrands/fixmystreet/staff.js index 5355a8f54..2a1c6a8f4 100644 --- a/web/cobrands/fixmystreet/staff.js +++ b/web/cobrands/fixmystreet/staff.js @@ -80,6 +80,18 @@ $.extend(fixmystreet.set_up, { $("#js-change-duplicate-report").click(refresh_duplicate_list); }, + action_scheduled_raise_defect: function() { + $("#report_inspect_form").find('[name=state]').on('change', function() { + if ($(this).val() !== "action scheduled") { + $("#js-inspect-action-scheduled").addClass("hidden"); + $('#raise_defect_yes').prop('required', false); + } else { + $("#js-inspect-action-scheduled").removeClass("hidden"); + $('#raise_defect_yes').prop('required', true); + } + }); + }, + list_item_actions: function() { $('.item-list--reports').on('click', ':submit', function(e) { e.preventDefault(); |