761670208a
This disables Submit button when the form has been submitted to prevent consequent submissions before the page has been loaded.
9 lines
250 B
JavaScript
9 lines
250 B
JavaScript
M.form_submit = {};
|
|
|
|
M.form_submit.init = function(Y, options) {
|
|
Y.on('submit', function(e) {
|
|
if (!containsErrors) {
|
|
e.target.one('#'+options.submitid).setAttribute('disabled', 'true');
|
|
}
|
|
}, '#'+options.formid);
|
|
}; |