diff options
Diffstat (limited to 'templates')
5 files changed, 59 insertions, 13 deletions
diff --git a/templates/web/base/admin/state_groups_select.html b/templates/web/base/admin/state_groups_select.html index 229d181ab..9a70cd2c9 100644 --- a/templates/web/base/admin/state_groups_select.html +++ b/templates/web/base/admin/state_groups_select.html @@ -1,14 +1,3 @@ [% PROCESS 'admin/report_blocks.html'; # For state_groups %] [% DEFAULT current_state = problem.state %] -<select class="form-control" name="state" id="state"> -[% IF include_empty %] - <option value="">---</option> -[% END %] -[% FOREACH group IN state_groups %] - <optgroup label="[% group.0 %]"> - [% FOREACH state IN group.1 %] - <option [% 'selected ' IF state == current_state %] value="[% state %]">[% state_pretty.$state %]</option> - [% END %] - </optgroup> -[% END %] -</select> +[% INCLUDE 'report/_state_select_field.html' %] diff --git a/templates/web/base/report/_inspect.html b/templates/web/base/report/_inspect.html index 3118a49b6..5a7e99ef9 100644 --- a/templates/web/base/report/_inspect.html +++ b/templates/web/base/report/_inspect.html @@ -64,7 +64,7 @@ [% IF permissions.report_inspect %] <p> <label for="state">[% loc('State') %]</label> - [% INCLUDE 'admin/state_groups_select.html' %] + [% INCLUDE 'report/inspect/state_groups_select.html' %] </p> <div id="js-duplicate-reports" class="[% "hidden" UNLESS problem.duplicate_of %]"> <input type="hidden" name="duplicate_of" value="[% problem.duplicate_of.id %]"> diff --git a/templates/web/base/report/_state_select_field.html b/templates/web/base/report/_state_select_field.html new file mode 100644 index 000000000..9b3ed18df --- /dev/null +++ b/templates/web/base/report/_state_select_field.html @@ -0,0 +1,12 @@ +<select class="form-control" name="state" id="state"> +[% IF include_empty %] + <option value="">---</option> +[% END %] +[% FOREACH group IN state_groups %] + <optgroup label="[% group.0 %]"> + [% FOREACH state IN group.1 %] + <option [% 'selected ' IF state == current_state %] value="[% state %]">[% state_pretty.$state %]</option> + [% END %] + </optgroup> +[% END %] +</select> diff --git a/templates/web/base/report/inspect/state_groups_select.html b/templates/web/base/report/inspect/state_groups_select.html new file mode 100644 index 000000000..c4043751b --- /dev/null +++ b/templates/web/base/report/inspect/state_groups_select.html @@ -0,0 +1,24 @@ +[% +SET state_pretty = { + 'confirmed' = loc('Open') + 'investigating' = loc('Investigating') + 'in progress' = loc('In progress') + 'action scheduled' = loc('Action Scheduled') + 'fixed - council' = loc('Fixed - Council') + 'unable to fix' = loc('No further action') + 'not responsible' = loc('Not Responsible') + 'duplicate' = loc('Duplicate') + 'internal referral' = loc('Internal referral') + 'hidden' = loc('Hidden') +}; + +SET state_groups = [ + [ loc('Open'), [ 'confirmed', 'investigating', 'in progress', 'action scheduled' ] ], + [ loc('Fixed'), [ 'fixed - council' ] ], + [ loc('Closed'), [ 'unable to fix', 'not responsible', 'duplicate', 'internal referral' ] ], + [ loc('Hidden'), [ 'hidden' ] ] +]; + +%] +[% DEFAULT current_state = problem.state %] +[% INCLUDE 'report/_state_select_field.html' %] diff --git a/templates/web/oxfordshire/report/inspect/state_groups_select.html b/templates/web/oxfordshire/report/inspect/state_groups_select.html new file mode 100644 index 000000000..d9db3864a --- /dev/null +++ b/templates/web/oxfordshire/report/inspect/state_groups_select.html @@ -0,0 +1,21 @@ +[% +SET state_pretty = { + 'confirmed' = loc('Open') + 'investigating' = loc('Investigating') + 'action scheduled' = loc('Action Scheduled') + 'fixed - council' = loc('Fixed') + 'not responsible' = loc('Not Responsible') + 'duplicate' = loc('Duplicate') + 'unable to fix' = loc('No further action') +}; + +SET state_groups = [ + [ loc('New'), [ 'confirmed', 'investigating' ] ], + [ loc('Scheduled'), [ 'action scheduled' ] ], + [ loc('Fixed'), [ 'fixed - council' ] ], + [ loc('Closed'), [ 'not responsible', 'duplicate', 'unable to fix' ] ] +]; + +%] +[% DEFAULT current_state = problem.state %] +[% INCLUDE 'report/_state_select_field.html' %] |