MediaWiki:DonationForm.js: Difference between revisions

Content deleted Content added
change GatewayFormChooser to GatewayChooser, change currency_code param to currency, remove ffname
fix hpc format fallback behaviour
Line 529:
};
 
if ( formats[currency] ) {
var format = formats[currency][language] || formats[currency]['default'] || formats[currency] || '\t';
} else {
var format = '\t';
}
 
// Radio button amounts
Line 702 ⟶ 706:
if ( params.payment_method === 'cc' && params.country === 'ZA' ) {
params.gateway = 'astropay';
}
 
Line 1,139 ⟶ 1,143:
// These get used in quite a few places
try {
donationForm.currency = form.currency_code.value;
} catch (error) {
donationForm.currency = 'USD';
}
donationForm.country = mw.util.getParamValue('country').toUpperCase();