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>
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/));