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 /templates | |
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 'templates')
-rw-r--r-- | templates/web/base/report/_inspect.html | 11 | ||||
-rw-r--r-- | templates/web/oxfordshire/report/inspect/state_groups_select.html | 5 |
2 files changed, 12 insertions, 4 deletions
diff --git a/templates/web/base/report/_inspect.html b/templates/web/base/report/_inspect.html index 98925271d..9d73fbb94 100644 --- a/templates/web/base/report/_inspect.html +++ b/templates/web/base/report/_inspect.html @@ -72,6 +72,17 @@ <label for="state">[% loc('State') %]</label> [% INCLUDE 'report/inspect/state_groups_select.html' %] </p> + [% IF permissions.report_instruct AND NOT problem.get_extra_metadata('inspected') %] + <div id="js-inspect-action-scheduled" class="[% "hidden" UNLESS problem.state == 'action scheduled' %]"> + <p>[% loc('Do you want to automatically raise a defect?') %]</p> + <p class="segmented-control segmented-control--radio"> + <input type="radio" name="raise_defect" id="raise_defect_yes" value="1"> + <label class="btn" for="raise_defect_yes">[% loc('Yes') %]</label> + <input type="radio" name="raise_defect" id="raise_defect_no" value="0"> + <label class="btn" for="raise_defect_no">[% loc('No') %]</label> + </p> + </div> + [% END %] <div id="js-duplicate-reports" class="[% "hidden" UNLESS problem.duplicate_of %]"> <input type="hidden" name="duplicate_of" value="[% problem.duplicate_of.id %]"> <p class="[% "hidden" UNLESS problem.duplicate_of %]"><strong>[% loc('Duplicate of') %]</strong></p> diff --git a/templates/web/oxfordshire/report/inspect/state_groups_select.html b/templates/web/oxfordshire/report/inspect/state_groups_select.html index dcb24c982..a5fce525c 100644 --- a/templates/web/oxfordshire/report/inspect/state_groups_select.html +++ b/templates/web/oxfordshire/report/inspect/state_groups_select.html @@ -2,14 +2,11 @@ SET state_groups = [ [ loc('New'), [ 'confirmed', 'investigating' ] ], + [ loc('Scheduled'), [ 'action scheduled' ] ], [ loc('Fixed'), [ 'fixed - council' ] ], [ loc('Closed'), [ 'not responsible', 'duplicate', 'unable to fix' ] ] ]; -IF c.user_exists AND c.user.has_body_permission_to('report_instruct'); - CALL state_groups.splice(1, 0, [ [ loc('Scheduled'), [ 'action scheduled' ] ] ]); -END - %] [% DEFAULT current_state = problem.state %] [% INCLUDE 'report/_state_select_field.html' %] |