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 :fc919fc796/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 commit63119a8686) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> (cherry picked from commitdb17c3787f) Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
This commit is contained in:
parent
87561304d2
commit
a02842d011
|
|
@ -82,7 +82,7 @@ function Check(f) {
|
|||
// So we use disabled instead. But disabled prevent values from being passed through the form at submit.
|
||||
// So we "un-disable" the elements just before submitting.
|
||||
// That's a bit clumsy, and if someone comes up with a better solution, feel free to improve that.
|
||||
$("select[name=field_value]").prop('disabled', false);
|
||||
$("select.input_marceditor").prop('disabled', false);
|
||||
} else {
|
||||
alertString2 = MSG_FORM_NOT_SUBMITTED;
|
||||
alertString2 += "\n------------------------------------------------------------------------------------\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue