show a confirmation dialog 'page' (pane) instead of the pop-up
authorberick <berick@esilibrary.com>
Thu, 17 Feb 2011 20:56:31 +0000 (15:56 -0500)
committerberick <berick@esilibrary.com>
Thu, 17 Feb 2011 20:56:31 +0000 (15:56 -0500)
Open-ILS/web/opac/skin/kcls/js/myopac.js
Open-ILS/web/opac/skin/kcls/xml/myopac/myopac_summary.xml

index bf3b61b..0bd72f8 100644 (file)
@@ -1671,10 +1671,32 @@ function drawPayFinesPage(patron, total, xacts, onPaymentSubmit) {
     if(!payFinesDrawn) {\r
                dojo.connect(oilsSelfckCCSubmit, 'onClick',\r
           function() {\r
-                         //alert(transCache[xacts[0][0]].transaction.xact_type());\r
+            hideMe($('pay_fines_now'));\r
+            unHideMe($('pay_fines_confirm'));\r
+\r
+            $('pay_fines_confirm_amount').innerHTML = \r
+                dojo.query("span", "oils-selfck-cc-payment-summary")[0].innerHTML;\r
+\r
+            dojo.connect(payConfirmSubmit, 'onClick', \r
+                function() { \r
+                    if (typeof(progressDialog) != "undefined") progressDialog.show(true);\r
+                    unHideMe($('pay_fines_now'));\r
+                    hideMe($('pay_fines_confirm'));\r
+                    sendCCPayment(patron, xacts, onPaymentSubmit);\r
+                } \r
+            );\r
+\r
+            dojo.connect(payConfirmCancel, 'onClick', \r
+                function() { \r
+                    unHideMe($('pay_fines_now'));\r
+                    hideMe($('pay_fines_confirm'));\r
+                }\r
+            );\r
+\r
+            /*\r
                        if(!confirm("Are you sure?")) return;\r
-            if (typeof(progressDialog) != "undefined") progressDialog.show(true);\r
             sendCCPayment(patron, xacts, onPaymentSubmit);\r
+            */\r
           }\r
        );\r
                payFinesDrawn = true;\r
index a3f45f0..7d18ca3 100644 (file)
     <iframe name='receipt-frame' style='border:1px solid #888; overflow:auto; width:500px; height:500px;'></iframe>\r
 </div>\r
 \r
+<div id='pay_fines_confirm' class='hide_me' style='font-size: 120%; width:100%; text-align: center; padding-top: 20px;'>\r
+    Amount to pay: $<strong id='pay_fines_confirm_amount'/>.  Are you sure?<br/><br/>\r
+    <button jsId='payConfirmSubmit' dojoType='dijit.form.Button'>Submit Payment</button>\r
+    <button jsId='payConfirmCancel' dojoType='dijit.form.Button'>Cancel</button>\r
+</div>\r
 <div id="pay_fines_now" class="hide_me">\r
 <div id='cc-payment-error-message' style='font-weight: bold; color: red; padding: 10px; border: 1px solid #888' class='hide_me'/>\r
 <table id='oils-selfck-cc-payment-table'>\r