diff options
Diffstat (limited to 'template/en/default')
-rw-r--r-- | template/en/default/search/boolean-charts.html.tmpl | 10 | ||||
-rw-r--r-- | template/en/default/search/search-report-select.html.tmpl | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/template/en/default/search/boolean-charts.html.tmpl b/template/en/default/search/boolean-charts.html.tmpl index 901de0501..bfb4e7bf1 100644 --- a/template/en/default/search/boolean-charts.html.tmpl +++ b/template/en/default/search/boolean-charts.html.tmpl @@ -134,7 +134,15 @@ id="f[% cond_num FILTER html %]" onchange="fix_query_string(this)" class="custom_search_form_field"> - [% FOREACH field = fields %] + [%# Turn the array in to a hash with the name as the key %] + [% + field_hash = {}; + FOREACH field IN fields; + field_hash.${field.name} = field; + END; + %] + [% FOREACH field_name = field_hash.keys.sort_by_field_name(field_descs) %] + [% field = field_hash.$field_name %] <option value="[% field.name FILTER html %]" [%~ ' selected="selected"' IF field.name == condition.f %]> [% field_descs.${field.name} || field.description FILTER html %] diff --git a/template/en/default/search/search-report-select.html.tmpl b/template/en/default/search/search-report-select.html.tmpl index 93b4c44f8..40eeda1c1 100644 --- a/template/en/default/search/search-report-select.html.tmpl +++ b/template/en/default/search/search-report-select.html.tmpl @@ -17,7 +17,7 @@ <select name="[% name FILTER html %]"> <option value=""><none></option> - [% FOREACH field = report_columns.keys.sort %] + [% FOREACH field = report_columns.keys.sort_by_field_name(field_descs) %] [% NEXT IF field == "classification" AND !Param('useclassification') %] [% NEXT IF field == "target_milestone" AND !Param('usetargetmilestone') %] [% NEXT IF field == "qa_contact" AND !Param('useqacontact') %] |