Bugzilla – Attachment 140102 Details for
Bug 31364
Saving multi-select system preference don't save when all checks are removed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31364: Allow multiple select system prefernces to saved when they are empty/null
Bug-31364-Allow-multiple-select-system-prefernces-.patch (text/plain), 1.42 KB, created by
Owen Leonard
on 2022-09-02 11:04:00 UTC
(
hide
)
Description:
Bug 31364: Allow multiple select system prefernces to saved when they are empty/null
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2022-09-02 11:04:00 UTC
Size:
1.42 KB
patch
obsolete
>From efab535d43142bf20056b6d24306aaf913ecaad1 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 1 Sep 2022 22:06:18 +0000 >Subject: [PATCH] Bug 31364: Allow multiple select system prefernces to saved > when they are empty/null > >TO test: >1. Have a multiple select system preference like > 'OPACHoldsIfAvailableAtPickupExceptions'. >2. Set a couple patron categories as exceptions and save. >3. Remove all the categories from the exception list and save. >4. You get a message that says 'Nothing to Save' and the changes are not > made. >5. Apply patch >6. Try 2-4 again, excpet this time it should save. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js | 2 +- > 1 file changed, 1 insertion(+), 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 fb63d4b397..9e10e862b7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js >@@ -13,7 +13,7 @@ KOHA.Preferences = { > // If a multiple select has all its entries unselected > var unserialized = new Array(); > $(modified_prefs).each(function(){ >- if ( $(this).attr('multiple') && $(this).val() == null ) { >+ if ( $(this).attr('multiple') ) { > unserialized.push($(this)); > } > }); >-- >2.20.1
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 31364
:
140064
|
140102
|
140201
|
140220
|
140269