Bug 20689: Replace marc (sub)field pull downs with input fields on item search fields config

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>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Katrin Fischer 2018-08-09 22:51:43 +00:00 committed by Fridolin Somers
parent eec528c3f6
commit c4f7a40793

View file

@ -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']) %]
[% 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>