MediaWiki:DonationFormSandbox.js: Difference between revisions
Content deleted Content added
copy from main |
No edit summary |
||
Line 327:
TODO: split data out? */
var hpcSet = mw.util.getParamValue('hpcSet');▼
// Look for 'hpc' parameter, then 'mrc'. If neither, then bail out.▼
var hpc = parseFloat( mw.util.getParamValue('hpc') );
if( isNaN(hpc) ) {
hpc = parseFloat( mw.util.getParamValue('mrc') );
if( isNaN(hpc) ) {
// Allow using hpcSet even without hpc, for MG appeals
hpc = 0;
} else {
return;
}
}
}
▲ var hpcSet = mw.util.getParamValue('hpcSet');
var currency = donationForm.currency;
Line 567 ⟶ 572:
radioAmountsData.CAD = radioAmountsData.USD;
radioAmountsData.NZD = radioAmountsData.USD;
// Major gifts appeals, because this is easier than adding a load of new forms to maintain
var currencyList = [ 'USD', 'CAD', 'AUD', 'NZD', 'GBP', 'EUR' ]; // close enough
for ( let i = 0; i < currencyList.length; i++ ) {
radioAmountsData[ currencyList[i] ].MG_2024_500 = [ 0, [ 500, 750, 1000, 1250, 1500, 1750, 2000 ] ];
radioAmountsData[ currencyList[i] ].MG_2024_650 = [ 0, [ 650, 750, 1000, 1250, 1500, 1750, 2000 ] ];
}
var appealAmountsData = {
|