Bugzilla – Attachment 162763 Details for
Bug 36234
Language prefs cannot be modified
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36234: Fix 'languages' prefs selection
Bug-36234-Fix-languages-prefs-selection.patch (text/plain), 1.54 KB, created by
PTFS Europe Sandboxes
on 2024-03-05 15:15:08 UTC
(
hide
)
Description:
Bug 36234: Fix 'languages' prefs selection
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2024-03-05 15:15:08 UTC
Size:
1.54 KB
patch
obsolete
>From 6a74141fe1e952cf761422092bdb5f5995d9a6a4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 5 Mar 2024 16:04:04 +0100 >Subject: [PATCH] Bug 36234: Fix 'languages' prefs selection > >Test plan: >Edit and save several types of sysprefs, reload the page to confirm they >are correctly saved, or check their values in DB > >Signed-off-by: Christian <christian.stelzenmueller@bsz-bw.de> >--- > koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js b/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js >index 2092dd8a68..cfda80a142 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js >@@ -8,7 +8,13 @@ KOHA.Preferences = { > return; > } > >- let sysprefs = $(form).find('.modified').toArray().reduce((map, e) => ({ ...map, [$(e).attr('name')]: [$(e).val()].flat()}), {}); >+ let sysprefs = $(form).find('.modified').not('.preference-checkbox').toArray().reduce((map, e) => ({ ...map, [$(e).attr('name')]: [$(e).val()].flat()}), {}); >+ >+ // language prefs >+ $(form).find('.modified.preference-checkbox:checked').toArray().forEach((elt) => { >+ (sysprefs[$(elt).attr('name')] = sysprefs[$(elt).attr('name')] || []).push($(elt).val()); >+ }); >+ > if ( !Object.keys(sysprefs).length ) { > humanMsg.displayAlert( __("Nothing to save") ); > return; >-- >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 36234
:
162756
|
162763
|
162893