Bugzilla – Attachment 140410 Details for
Bug 31234
SubfieldsToAllowForRestrictedEditing : data from drop-down menu not stored
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31234: SubfieldsToAllowForRestrictedEditing - data from drop-down menu not stored
Bug-31234-SubfieldsToAllowForRestrictedEditing---d.patch (text/plain), 2.34 KB, created by
David Nind
on 2022-09-11 18:41:44 UTC
(
hide
)
Description:
Bug 31234: SubfieldsToAllowForRestrictedEditing - data from drop-down menu not stored
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-09-11 18:41:44 UTC
Size:
2.34 KB
patch
obsolete
>From 4572d4c18d5c8b0775111591c8e705248dd91d59 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Tue, 26 Jul 2022 10:35:14 -1000 >Subject: [PATCH] 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> >--- > koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js b/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >index 840a9e45c7..1427f916a9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js >@@ -109,7 +109,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"; >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31234
:
138145
|
140410
|
141156