Bug 9468: make av-build-dropbox.inc available to OPAC
This patch makes the av-build-dropbox.inc template include introduced by the latest patches for bug 766 available to the prog and Bootstrap themes in the OPAC. See later patches in this series for testing. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Amended patch: Remove OPAC prog file Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
93ac5af0d8
commit
730b060baa
|
|
@ -0,0 +1,29 @@
|
|||
[% USE AuthorisedValues %]
|
||||
[%#
|
||||
Parameters:
|
||||
name: the name of the select element
|
||||
category: the authorised value category
|
||||
default: the default authorised value to select
|
||||
class: the CSS class of the select element
|
||||
size: the size to use for the input (generated if the authorised value category does not exist).
|
||||
%]
|
||||
|
||||
[% SET avs = AuthorisedValues.GetAuthValueDropbox( category, default ) %]
|
||||
[% DEFAULT
|
||||
class = ''
|
||||
size = 20
|
||||
%]
|
||||
|
||||
[% IF avs %]
|
||||
<select id="[% name %]" name="[% name %]" class="[% class %]" >
|
||||
[% FOR av IN avs %]
|
||||
[% IF av.default %]
|
||||
<option value="[% av.value %]" selected="selected">[% av.label | html_entity %]</option>
|
||||
[% ELSE %]
|
||||
<option value="[% av.value %]">[% av.label | html_entity %]</option>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</select>
|
||||
[% ELSE %]
|
||||
<input type="text" id="[% name %]" name="[% name %]" size="[% size %]" value="[% default | html_entity %]" class="[% class %]" />
|
||||
[% END %]
|
||||
Loading…
Reference in New Issue