diff options
author | lpsolit%gmail.com <> | 2006-05-30 04:15:56 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-05-30 04:15:56 +0200 |
commit | f3254c63caf96f5a1106272d8393a66f4a32fc42 (patch) | |
tree | d5c3e0e61dcff68e4f7728c382af479cf6cd576c /template/en/default | |
parent | ff51ae68bcb065dc9f8cce11718ac8b088864593 (diff) | |
download | bugzilla-f3254c63caf96f5a1106272d8393a66f4a32fc42.tar.gz bugzilla-f3254c63caf96f5a1106272d8393a66f4a32fc42.tar.xz |
Bug 335790: Field names in search form lists should be ordered alphabetically - Patch by Toms Baugis <toms.baugis@gmail.com> r=wicked a=myk
Diffstat (limited to 'template/en/default')
-rw-r--r-- | template/en/default/search/form.html.tmpl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl index c3b4d8bcb..879625d02 100644 --- a/template/en/default/search/form.html.tmpl +++ b/template/en/default/search/form.html.tmpl @@ -589,11 +589,17 @@ function doOnSelectProduct(selectmode) { <label for="chfield">where one or more of the following changed</label>: </dt> <dd> - <select name="chfield" id="chfield" multiple="multiple" size="4"> + [%# Create array, so we can sort it by description #%] + [% chfields = [] %] [% FOREACH field = chfield %] - <option value="[% field FILTER html %]" - [% " selected" IF lsearch(default.chfield, field) != -1 %]> - [% (field_descs.$field || field) FILTER html %]</option> + [% chfields.push({value => field, desc => (field_descs.$field || field) }) %] + [% END %] + + <select name="chfield" id="chfield" multiple="multiple" size="4"> + [% FOREACH field = chfields.sort('desc') %] + <option value="[% field.value FILTER html %]" + [% " selected" IF lsearch(default.chfield, field.value) != -1 %]> + [% field.desc FILTER html %]</option> [% END %] </select> </dd> |