From 9bb5160ccc30a6149c3d5538d8d2894253bcce00 Mon Sep 17 00:00:00 2001 From: Katrin Fischer <katrin.fischer.83@web.de> Date: Thu, 9 Aug 2018 22:51:43 +0000 Subject: [PATCH] Bug 20689: Replace marc (sub)field pull downs with input fields on item search fields config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pull down for marc subfields on the item search fields config page is long and hard to use. It also doesn't include the commonly used upper case letters for custom item subfields. Also hard to use with its 999 entries is the marc field list. It doesn't allow for tags like 01e, which exist in our MARC21 default framework. To test: - Go to Administration > Item search fields - Add different mappings with and without subfields - Verify the entered values are stored correctly - Edit mappings - Verify editing works and changes save correctly Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> --- .../admin-items-search-field-form.inc | 32 +++++++------------ 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc index 454bd113f1..52bcb7ca0b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc @@ -21,31 +21,21 @@ <span class="required">Required</span> </li> <li> - <label for="tagfield" required="required">MARC field: </label> - <select id="tagfield" name="tagfield" class="required" required="required"> - [% FOREACH tagfield IN ['001'..'999'] %] - [% IF field && field.tagfield == tagfield %] - <option value="[% tagfield | html %]" selected="selected">[% tagfield | html %]</option> - [% ELSE %] - <option value="[% tagfield | html %]">[% tagfield | html %]</option> - [% END %] - [% END %] - </select> + <label class="required" for="tagfield">MARC field: </label> + [% IF field && field.tagfield == tagfield %] + <input type="text" id="tagfield" name="tagfield" maxlength="3" size="3" class="required" required="required" value="[% tagfield | html %] /> + [% ELSE %] + <input type="text" id="tagfield" name="tagfield" maxlenght="3" size="3" class="required" required="required" /> + [% END %] <span class="required">Required</span> </li> <li> <label for="tagsubfield">MARC subfield: </label> - <select id="tagsubfield" name="tagsubfield"> - [% codes = [''] %] - [% codes = codes.merge([0..9], ['a'..'z']) | html %] - [% FOREACH tagsubfield IN codes %] - [% IF field && field.tagsubfield == tagsubfield %] - <option value="[% tagsubfield | html %]" selected="selected">[% tagsubfield | html %]</option> - [% ELSE %] - <option value="[% tagsubfield | html %]">[% tagsubfield | html %]</option> - [% END %] - [% END %] - </select> + [% IF field && field.tagsubfield == tagsubfield %] + <input type="text" id="tagsubfield" name="tagsubfield" maxlength="1" size="1" value="[% tagsubfield | html %]" /> + [% ELSE %] + <input type="text" id="tagsubfield" name="tagsubfield" maxlength="1" size="1" /> + [% END %] </li> <li> <label for="authorised_values_category">Authorised values category: </label> -- 2.19.1