From 52c01696b3eaa998c3494f21f45e27d92b1effeb Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 8 Aug 2016 17:13:59 -0400 Subject: [PATCH] fix unconditional email receipt button --- Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js index b7f9490903..3f82de710f 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js @@ -46,6 +46,7 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc , $scope.has_email_address = function() { return ( + patronSvc.current && patronSvc.current.email() && patronSvc.current.email().match(/.*@.*/).length ); @@ -219,7 +220,7 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc , } $scope.email_receipt = function() { - if ($scope.may_email_receipt() && $scope.checkouts.length) { + if ($scope.has_email_address() && $scope.checkouts.length) { return egCore.net.request( 'open-ils.circ', 'open-ils.circ.checkout.batch_notify.session.atomic', -- 2.11.0