LP 1774268: Default Hold Notification checkboxes
authorSuzanne Paterno <paterno@noblenet.org>
Tue, 6 Aug 2019 15:29:57 +0000 (11:29 -0400)
committerJason Boyer <JBoyer@eoli.info>
Wed, 1 Apr 2020 13:18:46 +0000 (09:18 -0400)
On patron edit screen set the email and phone notification
to true when patron doesn't have any prefernces. This mimics
the behavior in the xul client.

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 72a9ebd..f8c5ca7 100644 (file)
@@ -1896,8 +1896,12 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
 
     function extract_hold_notify() {
         var p = $scope.patron;
-        var notify = $scope.user_settings['opac.hold_notify'] || '';
-
+        var notify = $scope.user_settings['opac.hold_notify'];
+        if (!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/));