diff options
author | Simon Green <sgreen@redhat.com> | 2014-08-10 17:42:10 +1000 |
---|---|---|
committer | Simon Green <sgreen@redhat.com> | 2014-08-10 17:42:10 +1000 |
commit | f4b9806c5ab5e63383269ef328643145ade66004 (patch) | |
tree | 3bc3f7918a1aa5c80387c69846de5e34b241fba7 /template/en/default/search/boolean-charts.html.tmpl | |
parent | a6cb5aa278082c88958cfac19fc39b1cfc3306b0 (diff) | |
download | bugs-f4b9806c5ab5e63383269ef328643145ade66004.tar bugs-f4b9806c5ab5e63383269ef328643145ade66004.tar.gz bugs-f4b9806c5ab5e63383269ef328643145ade66004.tar.bz2 bugs-f4b9806c5ab5e63383269ef328643145ade66004.tar.xz bugs-f4b9806c5ab5e63383269ef328643145ade66004.zip |
Bug 897915 - Field lists not sorted alphabetically
r=dkl, a=sgreen
Diffstat (limited to 'template/en/default/search/boolean-charts.html.tmpl')
-rw-r--r-- | template/en/default/search/boolean-charts.html.tmpl | 10 |
1 files changed, 9 insertions, 1 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 %] |