Bug 31234: SubfieldsToAllowForRestrictedEditing - data from drop-down menu not stored
authorFridolin Somers <fridolin.somers@biblibre.com>
Tue, 26 Jul 2022 20:35:14 +0000 (10:35 -1000)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 4 Nov 2022 20:53:52 +0000 (20:53 +0000)
commitdb17c3787fea04d875d419889dc30cb61fcd2274
tree32558f424efa5288a39acd8369cd8b6e9355cad3
parenta13002e06e317e7b45f8423f4ad03f0e76684006
Bug 31234: SubfieldsToAllowForRestrictedEditing - data from drop-down menu not stored

Problem with items restricted edition, restriced fields with a drop-down
menu are not stored, since 21.11.

This comes from a change by Bug 28445 in items edition form :
  <select name="field_value"
change to :
  <select name="[% kohafield | html %]"

This breaks the special JS code :
https://git.koha-community.org/Koha-community/Koha/src/commit/fc919fc796df42c29e73cd527d3c425377fcc27a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js#L112

I propose we use "select.input_marceditor".

Test plan :
1. A librarian with 'edit_items_restricted' permission set
2. Item subfield not authorized for editing (SubfieldsToAllowForRestrictedEditing). In Marc framework, this subfield is linked to an authorized value (= drop-down menu). For exemple homebranch.
3. When adding/editing item, this subfield has a default value from drop-down menu and is not editable (OK).
4. Save item
=> Without patch : the subfield is empty, it should have the value from drop-down menu.
=> With patch : the subfield is saved with the value from drop-down menu.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 63119a86860174e668dc68fe559eba8d195e1b02)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js