LP#1774268: handle opac.hold_notify empty string in AngJS patron editor user/mmorgan/lp1774268_default_hold_notification_prefs_signoff_take_2
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Wed, 19 Feb 2020 20:36:30 +0000 (12:36 -0800)
committerMichele Morgan <mmorgan@noblenet.org>
Thu, 20 Feb 2020 21:26:22 +0000 (16:26 -0500)
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>
Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js

index 1b33d52..81a419f 100644 (file)
@@ -1871,6 +1871,11 @@ 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;