From: Jason Boyer Date: Wed, 1 Apr 2020 12:57:53 +0000 (-0400) Subject: LP1774268: Tidy up hold notification testing X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ca79b7f8e10f61ebb7ec13f4e8d7e0759a7b5f61;p=working%2FEvergreen.git LP1774268: Tidy up hold notification testing Signed-off-by: Jason Boyer --- 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..fdf6f86cd8 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,13 @@ 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 === '')) { + $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/));