From 5162a7956a7f14aacc3847b6379f95401060e1dc Mon Sep 17 00:00:00 2001 From: Jason Boyer Date: Wed, 1 Apr 2020 08:00:27 -0400 Subject: [PATCH] LP1774268: Stop treating undefined settings as special Rather than have to treat an undefined hold notification setting as a specific combination of values, just make it explicit and then save them. Signed-off-by: Jason Boyer --- Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js index 81a419f27f..c98ff93bee 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js @@ -1871,16 +1871,12 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore , function extract_hold_notify() { var notify = $scope.user_settings['opac.hold_notify']; - if (notify === '') { - $scope.hold_notify_type.phone = false; - $scope.hold_notify_type.email = false; - return; - } - if (!notify) { - $scope.hold_notify_type.phone = true; - $scope.hold_notify_type.email = true; - return; - } + + if (!notify && !(notify === '')) { + notify = "phone:email"; + $scope.user_settings['opac.hold_notify'] = notify; + } + $scope.hold_notify_type.phone = Boolean(notify.match(/phone/)); $scope.hold_notify_type.email = Boolean(notify.match(/email/)); $scope.hold_notify_type.sms = Boolean(notify.match(/sms/)); -- 2.11.0