From 0e5c67ecf24c585d05f4e63414133cc60946641f Mon Sep 17 00:00:00 2001 From: Victoria Mihell-Hale Date: Wed, 25 Sep 2024 14:47:51 +0100 Subject: [PATCH] [Island Roads] Default 'CONFIRM Subject' to be a blank selection A 'Please select' option with a blank value is added under every group header in the dropdown; this is selected by default (under the relevant header) to force the admin user to choose a triage category (rather than it defaulting to the first category in the group). --- templates/web/base/admin/triage/_inspect.html | 68 ++++++++++++++----- 1 file changed, 51 insertions(+), 17 deletions(-) diff --git a/templates/web/base/admin/triage/_inspect.html b/templates/web/base/admin/triage/_inspect.html index 8302a010ae..d51aa600f7 100644 --- a/templates/web/base/admin/triage/_inspect.html +++ b/templates/web/base/admin/triage/_inspect.html @@ -1,27 +1,61 @@ [% BLOCK category_list %] - + [% IF category_options.size %] + [%~ IF category_groups.size ~%] + [%~ FOREACH group IN category_groups ~%] + [% IF group.name %][% END %] + [% group_select = 0 %] + [% selected = 0 %] + [% IF group_select == 0 AND problem.category == group.name %] [% selected = 1; group_select = 1 %] [% END %] - + + + + [%~ FOREACH cat_op IN group.categories ~%] + + [% selected = 0 %] + [%~ END ~%] + [% IF group.name %][% END %] + [%~ END =%] + [% ELSE %] + [% FOREACH cat IN category_options %] + + [% END %] + [% END %] + [% END %] + + [% ELSE %] + [% END %] - [% END %] [% second_column = BLOCK -%]