MediaWiki:DonationForm.js: Difference between revisions

Content deleted Content added
add new validation method
don't modify Other input
Line 691:
}
 
if ( form.input_amount_other_box.value !== ""'' ) {
var otherAmount = form.input_amount_other_box.value;
otherAmount = otherAmount.replace(/[,.](\d)$/, '\:$10');
Line 697:
otherAmount = otherAmount.replace(/[\$£€¥,.]/g, '');
otherAmount = otherAmount.replace(/:/, '.');
form.input_amount_other_box.value = otherAmount;
form.amountGiven.value = otherAmount;
amount = otherAmount;