From: Galen Charlton Date: Mon, 8 Aug 2016 21:13:59 +0000 (-0400) Subject: fix unconditional email receipt button X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=52c01696b3eaa998c3494f21f45e27d92b1effeb;p=working%2FEvergreen.git fix unconditional email receipt button --- 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',