Fixed that "Create and continue" buttons are broken by r9391 (#10675).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9442 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
143c29d8e1
commit
d856e62ccf
@ -521,13 +521,16 @@ function hideOnLoad() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addFormObserversForDoubleSubmit() {
|
function addFormObserversForDoubleSubmit() {
|
||||||
$$('form[method=post]').each(function(el) {
|
$$('form[method=post]').each(function(form) {
|
||||||
Event.observe(el, 'submit', function(e) {
|
if (!form.hasClassName('multiple-submit')) {
|
||||||
var form = Event.element(e);
|
form.on('submit', function(form_submission) {
|
||||||
form.select('input[type=submit]').each(function(btn) {
|
if (form.getStorage().get('submitted')) {
|
||||||
btn.disable();
|
form_submission.stop();
|
||||||
|
} else {
|
||||||
|
form.getStorage().set('submitted', true);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user