Browse Source

Bug 12137: followup sort <select> index by value

adds alphabetical sorting to <select> lists displayed by
preferences.tt. although added for sorting the days of the
week, this may have larger ramifications. haven't been
tested thoroughly, but no apparent breakage seems to be
happening in preferences.

NOTE: Nice tweak. Makes days of week in sensible order.
      Properly adds sorting based on documentation that
      is really hard to find.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
3.22.x
Indranil Das Gupta 9 years ago
committed by Tomas Cohen Arazi
parent
commit
984f051adc
  1. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt

2
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt

@ -118,7 +118,7 @@
<input type="[%IF CHUNK.input_type %][% CHUNK.input_type %][% ELSE %]text[% END %]" name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]" class="preference preference-[% CHUNK.class or "short" %]" value="[% CHUNK.value %]" autocomplete="off" /> [% IF ( CHUNK.dateinput ) %]<span class="hint">[% INCLUDE 'date-format.inc' %]</span>[% END %]
[% ELSIF ( CHUNK.type_select ) %]
<select name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]" class="preference preference-[% CHUNK.class or "choice" %]">
[% FOREACH CHOICE IN CHUNK.CHOICES %]
[% FOREACH CHOICE IN CHUNK.CHOICES.sort('value') %]
[% IF ( CHOICE.selected ) %]
<option value="[% CHOICE.value %]" selected="selected">
[% ELSE %]

Loading…
Cancel
Save