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)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 3 Oct 2022 16:51:59 +0000 (13:51 -0300)
commit63119a86860174e668dc68fe559eba8d195e1b02
tree55e2955fe01046e9a3e5d023aa208afad257f652
parentfb1ca3311001b0a7c5b93a54330a9206ff5b41d9
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>
koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js