From e96779fcb42f9696966dcc572640c94a875f1ea4 Mon Sep 17 00:00:00 2001 From: berick Date: Tue, 1 Mar 2011 16:16:09 -0500 Subject: [PATCH] fetch updated user after email update to pick up new last_xact_id --- Open-ILS/web/opac/skin/kcls/js/myopac.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/opac/skin/kcls/js/myopac.js b/Open-ILS/web/opac/skin/kcls/js/myopac.js index 0bd72f8eb9..5172f46ef6 100644 --- a/Open-ILS/web/opac/skin/kcls/js/myopac.js +++ b/Open-ILS/web/opac/skin/kcls/js/myopac.js @@ -923,7 +923,9 @@ function myOPACUpdateEmail() { var req = new Request(UPDATE_EMAIL, G.user.session, email ); req.send(true); if(req.result()) { - G.user.email(email); + //G.user.email(email); + // force re-fetch to pick up latest last_xact_id + grabUser(null, true); hideMe($('myopac_update_email_row')); userShown = false; alertId('myopac_email_success'); @@ -1719,6 +1721,10 @@ function drawPayFinesPage(patron, total, xacts, onPaymentSubmit) { } function sendCCPayment(patron, xacts, onPaymentSubmit) { + // in this context, patron will always be G.user. set it explicitly + // to pick up the latest last_xact_id value + patron = G.user; + var args = { userid : patron.id(), payment_type : 'credit_card_payment', -- 2.11.0