MediaWiki:DonationForm.js: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
remove getQueryString
linting and alignment
Line 33: Line 33:
'BND' : 1.38,
'BND' : 1.38,
'BOB' : 6.8,
'BOB' : 6.8,
'BRL' : 4.15,
'BSD' : 1,
'BSD' : 1,
'BTN' : 72,
'BTN' : 72,
Line 255: Line 254:
],
],
'LTLA' : [
'LTLA' : [
[ 0, [ 3, 10, 15, 20, 35, 50, 100 ] ],
[ 0, [ 3, 10, 15, 20, 35, 50, 100 ] ],
[ 5, [ 5, 10, 20, 35, 50, 100, 150 ] ],
[ 5, [ 5, 10, 20, 35, 50, 100, 150 ] ],
[ 10, [ 10, 20, 35, 50, 75, 100, 150 ] ],
[ 10, [ 10, 20, 35, 50, 75, 100, 150 ] ],
[ 15, [ 15, 25, 35, 50, 75, 100, 250 ] ],
[ 15, [ 15, 25, 35, 50, 75, 100, 250 ] ],
[ 20, [ 20, 30, 50, 75, 100, 150, 250 ] ],
[ 20, [ 20, 30, 50, 75, 100, 150, 250 ] ],
[ 25, [ 25, 35, 50, 75, 100, 150, 250 ] ],
[ 25, [ 25, 35, 50, 75, 100, 150, 250 ] ],
[ 35, [ 25, 50, 75, 100, 200, 250, 300 ] ],
[ 35, [ 25, 50, 75, 100, 200, 250, 300 ] ],
Line 270: Line 269:
],
],
'midtier2018' : [
'midtier2018' : [
[ 0, [ 3, 5, 10, 20, 30, 50, 100 ] ],
[ 0, [ 3, 5, 10, 20, 30, 50, 100 ] ],
[ 5, [ 5, 10, 20, 35, 50, 100, 150 ] ],
[ 5, [ 5, 10, 20, 35, 50, 100, 150 ] ],
[ 10, [ 10, 15, 20, 35, 50, 100, 150 ] ],
[ 10, [ 10, 15, 20, 35, 50, 100, 150 ] ],
[ 15, [ 15, 20, 25, 35, 50, 100, 150 ] ],
[ 15, [ 15, 20, 25, 35, 50, 100, 150 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 20, [ 20, 25, 35, 50, 75, 100, 150 ] ],
[ 25, [ 35, 50, 75, 100, 150, 250, 500 ] ],
[ 25, [ 35, 50, 75, 100, 150, 250, 500 ] ],
[ 35, [ 50, 75, 100, 150, 250, 350, 500 ] ],
[ 35, [ 50, 75, 100, 150, 250, 350, 500 ] ],
[ 50, [ 75, 100, 150, 200, 250, 350, 500 ] ],
[ 50, [ 75, 100, 150, 200, 250, 350, 500 ] ],
[ 75, [ 100, 150, 200, 300, 400, 500, 1000 ] ],
[ 75, [ 100, 150, 200, 300, 400, 500, 1000 ] ],
[ 100, [ 150, 200, 250, 300, 400, 500, 1000 ] ],
[ 100, [ 150, 200, 250, 300, 400, 500, 1000 ] ],
[ 150, [ 200, 250, 300, 400, 500, 1000, 2500 ] ],
[ 150, [ 200, 250, 300, 400, 500, 1000, 2500 ] ],
[ 200, [ 500, 750, 1000, 2000, 3500, 5000, 7500 ] ],
[ 200, [ 500, 750, 1000, 2000, 3500, 5000, 7500 ] ],
[ 500, [ 750, 1000, 1500, 2500, 5000, 7500, 10000 ] ],
[ 500, [ 750, 1000, 1500, 2500, 5000, 7500, 10000 ] ],
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ]
[ 1000, [ 1000, 2000, 3000, 4000, 5000, 7500, 10000 ] ]
],
],
Line 628: Line 627:
return dflt;
return dflt;
}
}
}
};


/* The landing page info, separated by ~. This mostly exists for legacy reasons */
/* The landing page info, separated by ~. This mostly exists for legacy reasons */
Line 639: Line 638:
return utm_source;
return utm_source;


}
};


/* Return amount selected or input */
/* Return amount selected or input */
Line 674: Line 673:
}
}


}
};




Line 704: Line 703:


return !error;
return !error;
}
};


/**
/**
Line 730: Line 729:
}
}


}
};


donationForm.toggleMonthly = function(monthly) {
donationForm.toggleMonthly = function(monthly) {
Line 828: Line 827:
adjustHPC();
adjustHPC();
preSelect(); // Make sure to do this *after* other fiddling with values
preSelect(); // Make sure to do this *after* other fiddling with values
donationForm.localizeErrors()
donationForm.localizeErrors();
}
}
finally {
finally {