Template:Validation.js: Difference between revisions

Content deleted Content added
use inline error for optin
rm auto focusing of Other on amount error, it's probably more confusing than helpful
Line 50:
}
if ( error ) {
$( "#input_amount_other" ).focus();
$( "#input_amount_other_box" ).focus();
alert( "</html>{{int:donate_interface-amount-error}}<html>" );
} else if ( amount < minimums[currency] ) {
$( "#input_amount_other_box" ).val( '' );
$( "#input_amount_other" ).focus();
$( "#input_amount_other_box" ).focus();
alert( "</html>{{int:donate_interface-smallamount-error}}<html>".replace('$1', (minimums[currency] + ' ' + currency) ) );
error = true;
Line 63 ⟶ 59:
if ( amount > 10000*minimums[currency]) {
$( "#input_amount_other_box" ).val( '' );
$( "#input_amount_other" ).focus();
$( "#input_amount_other_box" ).focus();
errorMessageLarge = "</html>{{int:Donate interface-bigamount-error}}<html>";
errorMessageLarge = errorMessageLarge.replace('$1',10000*minimums[currency]);