953504a076
Two files av-build-dropbox.inc has linebreaks inside template directives, exposing internals (comments and tt code) to translations as mentioned in initial comment. Translators should not be confronted with such interal code. This patch fixes it. To test - Verify, that code changes make sense and have no more line breaks insied tt directives. - Run QA tools in newest version (checking for line breaks inside tt directives) - Bonus test: Create a "language" aa-AA (perl translate create aa-AA from folder misc/translator, verify that lines mentioned above do no longer appear in aa-AA-staff-prog.po and in aa-AA-opac-bootstrap.po Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
26 lines
1 KiB
HTML
26 lines
1 KiB
HTML
[% 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). %]
|
|
[%# all: add a "All" entry %]
|
|
|
|
[% SET avs = AuthorisedValues.GetAuthValueDropbox( category ) %]
|
|
[% DEFAULT class = '' size = 20 %]
|
|
|
|
[% IF avs %]
|
|
<select id="[% name %]" name="[% name %]" class="[% class %]" >
|
|
[% IF all %]<option value="">All</option>[% END %]
|
|
[% FOR av IN avs %]
|
|
[% IF av.authorised_value == default %]
|
|
<option value="[% av.authorised_value %]" selected="selected">[% av.lib | html_entity %]</option>
|
|
[% ELSE %]
|
|
<option value="[% av.authorised_value %]">[% av.lib | html_entity %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
[% ELSE %]
|
|
<input type="text" id="[% name %]" name="[% name %]" size="[% size %]" value="[% default | html_entity %]" class="[% class %]" />
|
|
[% END %]
|