]> git.koha-community.org Git - koha.git/commit
Bug 31364: Check length of the multiple syspref array instead whether it is null
authorJoonas Kylmälä <joonas.kylmala@iki.fi>
Sun, 4 Sep 2022 11:37:46 +0000 (14:37 +0300)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Mon, 14 Nov 2022 13:27:31 +0000 (14:27 +0100)
commitd18b6ab84df6f6171f22e5799089dc2a4334bda4
treee8261d7293a598b36a4bbbbed8081f5c7a019cbc
parenta858d135e18ffc0f35f6ec6b91f57d2359a07e24
Bug 31364: Check length of the multiple syspref array instead whether it is null

The multiple systempreferences are always defined as an empty array at
the minimum, so in order to determine whether we need to remove all
the selections from the systempreference we should check whether the
array is empty and not whether the array doesn't exist.

To test:
 1) Set at least 1 value for OPACHoldsIfAvailableAtPickupExceptions
 2) Remove all the values for OPACHoldsIfAvailableAtPickupExceptions
 and notice you get the message "Nothing to save"
 3) Apply patch and repeat, removing all the values should work now.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ce1efe7de0d71362f930a8fc5415fda797531a0b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 191aad389e84fa60b4ef168b9fc97878cb6fcdfa)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js