From 5f50e2f71f3261201f560fc4c9acc6c5a04a7a40 Mon Sep 17 00:00:00 2001 From: Jason Boyer Date: Wed, 1 Apr 2020 08:57:53 -0400 Subject: [PATCH] LP1774268: Tidy up hold notification testing Signed-off-by: Jason Boyer --- Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 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 b3a5cda829..4a340bd305 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 @@ -1897,16 +1897,13 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore , function extract_hold_notify() { var p = $scope.patron; 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 === '')) { + $scope.hold_notify_type.phone = true; + $scope.hold_notify_type.email = true; + return; } + $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