jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/373704 )
Change subject: Fix double continue button situations
......................................................................
Fix double continue button situations
If there are errors in the personal info fields and the user tries
to select a submethod, do nothing other than highlight the errors.
If the user has a submethod selected and reloads the page, clear the
selection and don't show the continue button.
This removes the confusing situations where there could be two
continue buttons on screen (from this, and from the iframe).
Bug: T149366
Change-Id: If7405408659f588e506179781ed7ab5874c0a04a
---
M modules/js/ext.donationInterface.forms.js
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
jenkins-bot: Verified
Ejegg: Looks good to me, approved
diff --git a/modules/js/ext.donationInterface.forms.js
b/modules/js/ext.donationInterface.forms.js
index 5b72dd3..8691b14 100644
--- a/modules/js/ext.donationInterface.forms.js
+++ b/modules/js/ext.donationInterface.forms.js
@@ -124,17 +124,17 @@
$( '#first_name' ).focus();
- // If a submethod is already selected on page load, show the
continue button
+ // If a submethod is already selected on page load, clear it
if ( $( 'input[name="payment_submethod"]:checked' ).length > 0
) {
- $( '#paymentContinue' ).show();
+ $( 'input[name="payment_submethod"]' ).attr( 'checked',
false );
}
- // Submit on submethod click if valid, otherwise show continue
button.
+ // Submit on submethod click if valid, otherwise do nothing.
$( 'input[name="payment_submethod"]' ).on( 'click', function ()
{
if ( di.validation.validate() ) {
di.forms.submit();
} else {
- $( '#paymentContinue' ).show();
+ return false;
}
} );
--
To view, visit https://gerrit.wikimedia.org/r/373704
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If7405408659f588e506179781ed7ab5874c0a04a
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Pcoombe <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Mepps <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits