MediaWiki:DonationFormSandbox.js: Difference between revisions
Content deleted Content added
factor out donationForm.formatAmount method |
use new method when localizing errors |
||
Line 225:
/* Localize the amount errors. Call when initialising form. */
donationForm.localizeErrors = function() {
var currency = donationForm.currency
locale = donationForm.getLocale( mw.config.get('wgPageContentLanguage'), donationForm.country );
$('.lp-error-smallamount').text( function( index, oldText ) {
return oldText.replace( '$1',
});
Line 245 ⟶ 242:
$('.lp-error-bigamount').text( function( index, oldText ) {
return oldText.replace( '$1',
.replace( '$2', currency )
.replace( '$3', 'benefactors@wikimedia.org' )
.replace( '$4', donationForm.formatAmount( donationForm.maxUSD, locale ) );
});
};
|