From dbe4a98e1b61e86f8d7e37f692d45b55e4a342e6 Mon Sep 17 00:00:00 2001 From: berick Date: Fri, 11 Feb 2011 13:27:10 -0500 Subject: [PATCH] after jumping away from the payment form to update email address, return to the payment form when done w/ new email listed --- Open-ILS/web/opac/skin/kcls/js/myopac.js | 15 ++++++++++++++- Open-ILS/web/opac/skin/kcls/xml/myopac/myopac_summary.xml | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/opac/skin/kcls/js/myopac.js b/Open-ILS/web/opac/skin/kcls/js/myopac.js index af91e05028..852a36c48a 100644 --- a/Open-ILS/web/opac/skin/kcls/js/myopac.js +++ b/Open-ILS/web/opac/skin/kcls/js/myopac.js @@ -65,6 +65,7 @@ var myopacGenericTransTemplate; var myopacCircTransTemplate; var addrRowTemplate; var notesTemplate; +var myopacReturnToPayment = false; function myOPACInit() { if(!(G.user && G.user.session)) { @@ -149,6 +150,9 @@ function myOPACChangePage( page ) { hideMe(hh); hideMe(pp); hideMe(bb); + if(page != 'prefs') + myopacReturnToPayment = false; + var oncomplete = null; switch( page ) { @@ -919,11 +923,20 @@ function myOPACUpdateEmail() { var req = new Request(UPDATE_EMAIL, G.user.session, email ); req.send(true); if(req.result()) { - G.user.usrname(email); + G.user.email(email); hideMe($('myopac_update_email_row')); userShown = false; alertId('myopac_email_success'); myOPACShowUser(true); + + // user got here after trying to make a payment then deciding + // the email addr needed updating. take the user back to the + // in-progress payment form + if(myopacReturnToPayment) { + myopacReturnToPayment = false; + myOPACChangePage("summary"); + $('myopac-cc-email').innerHTML = email; + } return; } diff --git a/Open-ILS/web/opac/skin/kcls/xml/myopac/myopac_summary.xml b/Open-ILS/web/opac/skin/kcls/xml/myopac/myopac_summary.xml index 375bdaf187..fb542a8d7b 100644 --- a/Open-ILS/web/opac/skin/kcls/xml/myopac/myopac_summary.xml +++ b/Open-ILS/web/opac/skin/kcls/xml/myopac/myopac_summary.xml @@ -215,7 +215,7 @@ - Update + Update -- 2.11.0