Bug 34565: Label mismatch in MARC21 006 and 008 cataloging plugins

This patch modifies the JS which builds the table of options for
populating MARC21 fields 006 and 008 when using the cataloging plugin.

To test, apply the patch and go to Cataloging -> New record.

- Click the plugin trigger link next to the 006 input field (you may
  need to click the tag to expand it.
- In the table of input fields, test that clicking the label, e.g. "Type
  of material", "00 - Form of material," etc,  moves focus to the
  corresponding form field.
- Perform the same test on the plugin-popup for field 008.

Signed-off-by: Andrew <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fb48155cc4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Owen Leonard 2023-08-17 11:37:30 +00:00 committed by Fridolin Somers
parent f98e4faee2
commit ae8937fb8d
1 changed files with 1 additions and 1 deletions

View File

@ -307,7 +307,7 @@ function changeH4Result(form, h4_result, tr_result, pos, value)
try {
url = ((nodePos.getAttributeNode("url") || nodePos.hasAttribute("url")) && nodePos.getAttribute("url") != "" && nodePos.getElementsByTagName('urltext')[0].textContent != "")?"&nbsp;<a href='" + nodePos.attributes.getNamedItem("url").nodeValue + "' target='_blank'>" + nodePos.getElementsByTagName('urltext')[0].textContent + "</a>":"";
} catch (e) { url = "";}
td.innerHTML = "<label for='" + pos + "' title='" + title + "'>" + pos + " - " + name + url + "</label>";
td.innerHTML = "<label for='f" + pos + "' title='" + title + "'>" + pos + " - " + name + url + "</label>";
td = tr.insertCell(tr.cells.length);
value = returnValuePosFromResult(result, pos);
if ((index = pos.indexOf("-")) > 0) { // Position interval