MediaWiki:DonationForm.js: Difference between revisions
Content deleted Content added
rm cc-worldpay, unused |
moving inline javascript from Template:Optin/Default |
||
Line 694:
// Temporary fix for https://phabricator.wikimedia.org/T254274#6188493
if ( paymentMethod === 'cc' ) {
}
Line 767:
var utm_source = mw.util.getParamValue( 'utm_source' ) + '.';
var getParam = function( param, removeText, dflt ) {
if ( mw.util.getParamValue( param ) ) {
Line 955:
}
return parseFloat( feeAmount.toFixed(2) );
};
$('.optin-options').on('change', function(e) {
$('#error-optin').hide();
// Only do all this if we have translated prompts
if ( $('.optin-no-prompt').data('is-translated') === 'yes' ) {
if ( e.target.id === 'optin-no' ) {
$('.optin-no-prompt').removeClass('is-positive');
if ( !$('.optin-no-prompt').is(':visible') ) {
$('.optin-no-prompt').slideDown();
} else {
$('.optin-no-prompt').addClass('is-positive');
}
}
});
};
Line 1,040 ⟶ 1,060:
}
donationForm.initOptin();
▲ if ( typeof initOptin === 'function' ) {
▲ initOptin();
▲ }
try {
|