MediaWiki:DonationForm.js: Difference between revisions
Content deleted Content added
don't just overwrite existing utm_key phab:T256681 |
create noRecurringCountries to hide monthly option, disallow monthly preselect for them - phab:T234235 |
||
Line 10:
'vh' : window.innerHeight
};
// Don't offer recurring at all in these countries
donationForm.noRecurringCountries = [ 'AR', 'CL', 'CO', 'MX', 'PE', 'BR', 'IN' ];
donationForm.maxUSD = 12000;
Line 678 ⟶ 681:
donationForm.redirectPayment = function( paymentMethod, paymentSubMethod, skipAmountValidation ) {
var form = document.forms['donateForm'];
if ( donationForm.validate( skipAmountValidation ) ) {
Line 1,041 ⟶ 1,044:
form.referrer.value = document.referrer.replace(/https?:\/\//i, "");
// hide frequency options
if ( donationForm.noRecurringCountries.indexOf( form.country.value
$(
$(
}
Line 1,066 ⟶ 1,068:
// Allow preselecting monthly
if( mw.util.getParamValue('monthly')
&& donationForm.noRecurringCountries.indexOf( form.country.value ) === -1 ) {
$('#frequency_monthly').click();
}
|