MediaWiki:DonationForm mctest.js: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
moved monthllyconvert js loading to common.js |
make the code controlling input into Other field a function, so we can re-use it for monthlyconvert Other |
||
Line 1,047: | Line 1,047: | ||
} |
} |
||
}); |
}); |
||
}; |
|||
/** |
|||
* Block typing letters and symbols in given input. Used for Other amount inputs |
|||
* |
|||
* If we don't do this, Safari allows typing them and then chokes on submit |
|||
⚫ | |||
* |
|||
* @param {Element} inputElement The element to block typing on |
|||
*/ |
|||
donationForm.otherInputControl = function( inputElement ) { |
|||
if ( inputElement ) { |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
} |
|||
}; |
}; |
||
Line 1,061: | Line 1,086: | ||
donationForm.country = mw.util.getParamValue('country'); |
donationForm.country = mw.util.getParamValue('country'); |
||
// Block typing symbols in |
// Block typing symbols in Other field |
||
⚫ | |||
⚫ | |||
⚫ | |||
if ( amountOtherInput ) { |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
} |
|||
⚫ | |||
⚫ | |||
// Validate amount and update fee when selected/entered |
// Validate amount and update fee when selected/entered |