Bug 18789: Use Koha::Patron->is_adult where needed
[koha.git] / koha-tmpl / intranet-tmpl / prog / 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 [%# all: add a "All" entry %]
9
10 [% SET avs = AuthorisedValues.GetAuthValueDropbox( category ) %]
11 [% DEFAULT class = '' size = 20 %]
12
13 [% IF avs %]
14   <select id="[% name %]" name="[% name %]" class="[% class %]" >
15   [% IF all %]<option value="">All</option>[% END %]
16   [% FOR av IN avs %]
17     [% IF av.authorised_value == default %]
18       <option value="[% av.authorised_value %]" selected="selected">[% av.lib | html_entity %]</option>
19     [% ELSE %]
20       <option value="[% av.authorised_value %]">[% av.lib | html_entity %]</option>
21     [% END %]
22   [% END %]
23   </select>
24 [% ELSE %]
25   <input type="text" id="[% name %]" name="[% name %]" size="[% size %]" value="[% default | html_entity %]" class="[% class %]" />
26 [% END %]