Bug 15091: DEBT is IMPOSSIBLE, not NEEDSCONFIRMATION
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / av-build-dropbox.inc
1 [% USE AuthorisedValues %]
2 [%#
3     Parameters:
4     name: the name of the select element
5     category: the authorised value category
6     default: the default authorised value to select
7     class: the CSS class of the select element
8     size: the size to use for the input (generated if the authorised value category does not exist).
9 %]
10
11 [% SET avs = AuthorisedValues.GetAuthValueDropbox( category, default ) %]
12 [% DEFAULT
13     class = ''
14     size = 20
15 %]
16
17 [% IF avs %]
18   <select id="[% name %]" name="[% name %]" class="[% class %]" >
19   [% FOR av IN avs %]
20     [% IF av.default %]
21       <option value="[% av.value %]" selected="selected">[% av.label | html_entity %]</option>
22     [% ELSE %]
23       <option value="[% av.value %]">[% av.label | html_entity %]</option>
24     [% END %]
25   [% END %]
26   </select>
27 [% ELSE %]
28   <input type="text" id="[% name %]" name="[% name %]" size="[% size %]" value="[% default | html_entity %]" class="[% class %]" />
29 [% END %]