MediaWiki:DonationFormSandbox.js: Difference between revisions
Content deleted Content added
try and use currencyDisplay: 'narrowSymbol' if browser supports it |
copy from main |
||
Line 24:
*/
donationForm.getLocale = function( language, country ) {
// Sometimes in email testing links the uselang is a variable contiaining %
// In that case fall back to English so locale code doesn't break form
if ( language.match('%') ) {
language = 'en';
}
if ( language === 'en-gb' ) {
language = 'en';
Line 40 ⟶ 45:
// Don't offer recurring at all in these countries
donationForm.noRecurringCountries = [ 'AR', 'IN' ];
donationForm.noRecurringPaypalCountries = [ 'CL', 'CO', 'PE', 'UY', 'BR' ];
Line 334 ⟶ 339:
var currency = donationForm.currency;
// If changing, please update https://docs.google.com/spreadsheets/d/1e02TsZ_bKDAS1BMVBCdyo9D7RGln_wCGnkg7IF5kU5s/edit
Line 1,088 ⟶ 1,092:
'UAH' : 10,
'ZAR' : 5,
// Latin America // Updated
'BRL' : 1.75,
'ARS' :
'CLP' :
'COP' :
'MXN' : 6,
'PEN' : 1.
'UYU' :
};
Line 1,416 ⟶ 1,420:
// Only show Amazon for links from Ways to give
if (
mw.util.getParamValue( 'wmf_source' ) === 'Waystogive' ||
Line 1,457 ⟶ 1,460:
&& mw.util.getParamValue('monthly') !== '0'
&& donationForm.noRecurringCountries.indexOf( donationForm.country ) === -1
&& mw.util.getParamValue('utm_medium') !== 'endowment'
&& mw.util.getParamValue('wmf_medium') !== 'endowment'
) {
$('#frequency_monthly').click();
|