mirror of
https://github.com/redmine/redmine.git
synced 2026-03-05 12:01:23 +01:00
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:
@@ -521,13 +521,16 @@ function hideOnLoad() {
|
||||
}
|
||||
|
||||
function addFormObserversForDoubleSubmit() {
|
||||
$$('form[method=post]').each(function(el) {
|
||||
Event.observe(el, 'submit', function(e) {
|
||||
var form = Event.element(e);
|
||||
form.select('input[type=submit]').each(function(btn) {
|
||||
btn.disable();
|
||||
$$('form[method=post]').each(function(form) {
|
||||
if (!form.hasClassName('multiple-submit')) {
|
||||
form.on('submit', function(form_submission) {
|
||||
if (form.getStorage().get('submitted')) {
|
||||
form_submission.stop();
|
||||
} else {
|
||||
form.getStorage().set('submitted', true);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user