From 83c5aa01ff1c284f9b705f43f314bdf2eb53df33 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 4 Aug 2016 12:50:46 -0400 Subject: [PATCH] tweaks to self-check * redirect page if user elects to have no receipt upon logging out * correctly invoke open-ils.circ.checkout.batch_notify.session * hide not just the email checkbox, but the label as well if user doesn't have email receipts enabled Signed-off-by: Galen Charlton --- Open-ILS/src/templates/circ/selfcheck/summary.tt2 | 2 +- Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/templates/circ/selfcheck/summary.tt2 b/Open-ILS/src/templates/circ/selfcheck/summary.tt2 index 82ffb2d7f5..2e0b44eade 100644 --- a/Open-ILS/src/templates/circ/selfcheck/summary.tt2 +++ b/Open-ILS/src/templates/circ/selfcheck/summary.tt2 @@ -7,7 +7,7 @@ [% l('Receipt:') %] [% l('Print') %] [% l('None') %] - [% l('Email') %] +
[% l('Items Checked Out') %] diff --git a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js index 748f973c5c..3959fbca07 100644 --- a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js @@ -469,7 +469,7 @@ SelfCheckManager.prototype.fetchPatron = function(barcode, usrname) { if (this.patron.email() && // they have an email address set and ... this.patron.email().match(/.*@.*/).length > 0 // it sorta looks like an email address ) { - openils.Util.removeCSSClass( dojo.byId('oils-selfck-receipt-email'), 'hidden' ); + openils.Util.removeCSSClass( dojo.byId('oils-selfck-receipt-email').parentNode, 'hidden' ); if (user_setting_value(this.patron, 'circ.send_email_checkout_receipts') == 'true') // their selected default dojo.byId('oils-selfck-receipt-email').checked = true; } @@ -1345,8 +1345,6 @@ SelfCheckManager.prototype.emailSessionReceipt = function(callback) { var params = [ this.authtoken, this.patron.id(), - null, - 'format.selfcheck.checkout', circIds ]; @@ -1651,6 +1649,9 @@ SelfCheckManager.prototype.logoutPatron = function(print) { location.href = location.href; } ); + } else { + // user elected to get no receipt + location.href = location.href; } } else { location.href = location.href; -- 2.11.0