LP#1774268: handle opac.hold_notify empty string in AngJS patron editor
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Wed, 19 Feb 2020 20:36:30 +0000 (12:36 -0800)
committerJason Boyer <JBoyer@eoli.info>
Wed, 1 Apr 2020 13:18:46 +0000 (09:18 -0400)
If a patron does not want either phone or email hold notifications,
their opac.hold_notify user setting will be an empty string.  Let's
ensure that the hold notify checkboxes remain unchecked in the patron
editor when that is the case.

Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Jason Boyer <JBoyer@eoli.info>
Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js

index f8c5ca7..b3a5cda 100644 (file)
@@ -1897,6 +1897,11 @@ 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;