Koha/koha-tmpl/intranet-tmpl/prog/en/includes/additional-fields-entry.inc
Julian Maurice 904a488460 Bug 15774: Use Koha::Object(s) for additional fields
A lot of code can be removed just by using Koha::Object

It also makes fetching and updating additional field values easier.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-07 20:37:05 +00:00

34 lines
1.8 KiB
PHP

[% USE AuthorisedValues %]
[% IF wrap_fieldset != 0 %]
<fieldset class="rows">
<legend>Additional fields</legend>
<ol>
[% END %]
[% FOR field IN available %]
<li>
<label for="additional_field_[% field.id %]"> [% field.name %]: </label>
[% IF field.authorised_value_category %]
<select name="additional_field_[% field.id %]" id="additional_field_[% field.id %]">
<option value="">All</option>
[% FOREACH av IN AuthorisedValues.GetAuthValueDropbox( field.authorised_value_category ) %]
[% IF av.authorised_value == values.${field.id} %]
<option value="[% av.authorised_value %]" selected="selected">[% av.lib %]</option>
[% ELSE %]
<option value="[% av.authorised_value %]">[% av.lib %]</option>
[% END %]
[% END %]
</select> (Authorised values for [% field.authorised_value_category %])
[% ELSE %]
[% IF field.marcfield %]
<input type="text" value="[% values.${field.id} %]" id="additional_field_[% field.id %]" name="additional_field_[% field.id %]" readonly="readonly" />
This value will be filled with the [% field.marcfield %] subfield of the selected biblio.
[% ELSE %]
<input type="text" value="[% values.${field.id} %]" id="additional_field_[% field.id %]" name="additional_field_[% field.id %]" />
[% END %]
[% END %]
</li>
[% END %]
[% IF wrap_fieldset != 0 %]
</ol>
</fieldset>
[% END %]