XenoRyet has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/282416

Change subject: Allow clicking on payment method to submit form.
......................................................................

Allow clicking on payment method to submit form.

This allows user to retry the same card type when arriving via back button from 
the
Astropay form.

Bug: T130673
Change-Id: I02cc6ad9a28c803f3469ad43b778036f28beb90d
---
M astropay_gateway/astropay.js
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/16/282416/1

diff --git a/astropay_gateway/astropay.js b/astropay_gateway/astropay.js
index 1ced6cd..279801a 100644
--- a/astropay_gateway/astropay.js
+++ b/astropay_gateway/astropay.js
@@ -15,6 +15,16 @@
                }
        } );
 
+       // Submit on click of an already selected submethod in case we arrived
+       // by back button and the continue button didn't show.
+       $( 'input[name="payment_submethod"]' ).on( 'click', function() {
+               if ( window.validate_form( form ) ) {
+                       submitForm();
+               } else {
+                       $( '#paymentContinue' ).show();
+               }
+       } );
+
        $( '#paymentContinueBtn' ).click( function() {
                if ( window.validate_form( form ) ) {
                        submitForm();

-- 
To view, visit https://gerrit.wikimedia.org/r/282416
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I02cc6ad9a28c803f3469ad43b778036f28beb90d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: XenoRyet <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to