Template:2011FR/Form-section-radiobuttons: Difference between revisions

From Donate
Jump to navigation Jump to search
Content deleted Content added
Cbarr (talk | contribs)
No edit summary
Cbarr (talk | contribs)
No edit summary
Line 77: Line 77:
}
}
}
}
if ( form.amountGiven.value != "</html>{{int:donate_interface-other}}<html>" ) {
if ( form.input_amount_other_box.value != "</html>{{int:donate_interface-other}}<html>" ) {
var otherAmount = form.amountGiven.value;
var otherAmount = form.input_amount_other_box.value;
otherAmount = otherAmount.replace(/[,.](\d)$/, '\:$10');
otherAmount = otherAmount.replace(/[,.](\d)$/, '\:$10');
otherAmount = otherAmount.replace(/[,.](\d)(\d)$/, '\:$1$2');
otherAmount = otherAmount.replace(/[,.](\d)(\d)$/, '\:$1$2');
otherAmount = otherAmount.replace(/[\$,.]/g, '');
otherAmount = otherAmount.replace(/[\$,.]/g, '');
otherAmount = otherAmount.replace(/:/, '.');
otherAmount = otherAmount.replace(/:/, '.');
form.input_amount_other_box.value = otherAmount;
form.amountGiven.value = otherAmount;
form.amountGiven.value = otherAmount;
amount = otherAmount;
amount = otherAmount;
Line 143: Line 144:
<input type="radio" name="amount" id="input_amount_other" value="" />
<input type="radio" name="amount" id="input_amount_other" value="" />
</html>{{#ifeq:{{{currency-position}}}|before|{{{currency-symbol}}}|}}<html>
</html>{{#ifeq:{{{currency-position}}}|before|{{{currency-symbol}}}|}}<html>
<input type="text" name="amountGiven" id="input_amount_other_box" size="3" autocomplete="off" value="</html>{{int:donate_interface-other}}<html>" onfocus="clearOther(this)"/>
<input type="text" id="input_amount_other_box" size="3" autocomplete="off" value="</html>{{int:donate_interface-other}}<html>" onfocus="clearOther(this)"/>
</html>{{#ifeq:{{{currency-position}}}|after|{{{currency-symbol}}}|}}<html>
</html>{{#ifeq:{{{currency-position}}}|after|{{{currency-symbol}}}|}}<html>
</td>
</td>

Revision as of 20:42, 4 November 2011

Donation amount