MediaWiki:DonationForm.js: Difference between revisions
Content deleted Content added
using slightly better syntax for accessing form |
renaming form from paypalcontribution to donateForm |
||
Line 210:
/* Localize the amount errors. Call when initialising form. */
donationForm.localizeErrors = function() {
var form = document.forms['
var currency = form.currency_code.value;
var minAmount = donationForm.minimums[ currency ];
Line 678:
donationForm.redirectPayment = function( paymentMethod, paymentSubMethod, skipAmountValidation ) {
var form = document.forms['
if ( donationForm.validate( skipAmountValidation ) ) {
Line 806:
/* Return amount selected or input */
donationForm.getAmount = function() {
var form = document.forms['
var amount = null;
donationForm.extraData.otherAmt = 0;
Line 848:
var error = false;
var form = document.forms['
// Reset all errors
Line 876:
donationForm.validateAmount = function() {
var form = document.forms['
var amount = donationForm.getAmount();
var currency = form.currency_code.value;
Line 924:
donationForm.calculateFee = function( amount ) {
var form = document.forms['
// Minimum fee/PTF amounts. Default is 0.35.
Line 987:
mw.loader.using( ['mediawiki.util'] ).done( function() {
var form = document.forms['
// Block typing symbols in input field, otherwise Safari allows them and then chokes
Line 1,014:
// Disable submitting form with Enter key
$('form[name="
var code = ( e.keyCode ? e.keyCode : e.which );
if ( code == 13 ) {
|