MediaWiki:DonationForm.js: Difference between revisions

Content deleted Content added
fix for phab:T287706 - too many decimal places in errors
improved rounding for error amounts
Line 225:
var currency = donationForm.currency;
var minAmount = donationForm.minimums[ currency ];
/* T287706 - round to 2 decimal places (rounding up) */
var numFormat = function( amount ) {
if (return Math.floorceil( amount )* ===100 amount) )/ {100;
};
return amount.toString();
} else {
return amount.toFixed(2);
}
}
 
$('.lp-error-smallamount').text( function( index, oldText ) {
Line 253 ⟶ 249:
});
};
 
 
function adjustHPC() {