Bug 18682 - Translatability: Get rid of [%% in translation for 2 files av-build-dropb...
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / includes / av-build-dropbox.inc
1 [% USE AuthorisedValues %]
2 [%# Parameters: %] 
3 [%# name: the name of the select element %]
4 [%# category: the authorised value category %]
5 [%# default: the default authorised value to select %]
6 [%# class: the CSS class of the select element %]
7 [%# size: the size to use for the input (generated if the authorised value category does not exist). %]
8
9 [% SET avs = AuthorisedValues.GetAuthValueDropbox( category ) %]
10 [% DEFAULT class = '' size = 20 %]
11
12 [% IF avs %]
13   <select id="[% name %]" name="[% name %]" class="[% class %]" >
14   [% FOR av IN avs %]
15     [% IF av.authorised_value == default %]
16       <option value="[% av.authorised_value %]" selected="selected">[% av.lib | html_entity %]</option>
17     [% ELSE %]
18       <option value="[% av.authorised_value %]">[% av.lib | html_entity %]</option>
19     [% END %]
20   [% END %]
21   </select>
22 [% ELSE %]
23   <input type="text" id="[% name %]" name="[% name %]" size="[% size %]" value="[% default | html_entity %]" class="[% class %]" />
24 [% END %]