aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/report/_state_select_field.html11
1 files changed, 10 insertions, 1 deletions
diff --git a/templates/web/base/report/_state_select_field.html b/templates/web/base/report/_state_select_field.html
index 9b3ed18df..adec1ff06 100644
--- a/templates/web/base/report/_state_select_field.html
+++ b/templates/web/base/report/_state_select_field.html
@@ -2,10 +2,19 @@
[% IF include_empty %]
<option value="">---</option>
[% END %]
+[% SET found = 0 ~%]
+[% FOREACH group IN state_groups ~%]
+ [% FOREACH state IN group.1 ~%]
+ [% SET found = 1 IF state == current_state ~%]
+ [% END ~%]
+[% END ~%]
+[% IF NOT found ~%]
+ <option selected value="[% current_state %]">[% state_pretty.$current_state %]</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>
+ <option [% 'selected ' IF state == current_state %]value="[% state %]">[% state_pretty.$state %]</option>
[% END %]
</optgroup>
[% END %]