@@ -521,13 +521,16 function hideOnLoad() { | |||||
521 | } |
|
521 | } | |
522 |
|
522 | |||
523 | function addFormObserversForDoubleSubmit() { |
|
523 | function addFormObserversForDoubleSubmit() { | |
524 |
$$('form[method=post]').each(function( |
|
524 | $$('form[method=post]').each(function(form) { | |
525 | Event.observe(el, 'submit', function(e) { |
|
525 | if (!form.hasClassName('multiple-submit')) { | |
526 | var form = Event.element(e); |
|
526 | form.on('submit', function(form_submission) { | |
527 | form.select('input[type=submit]').each(function(btn) { |
|
527 | if (form.getStorage().get('submitted')) { | |
528 | btn.disable(); |
|
528 | form_submission.stop(); | |
|
529 | } else { | |||
|
530 | form.getStorage().set('submitted', true); | |||
|
531 | } | |||
529 | }); |
|
532 | }); | |
530 |
} |
|
533 | } | |
531 | }); |
|
534 | }); | |
532 | } |
|
535 | } | |
533 |
|
536 |
General Comments 0
You need to be logged in to leave comments.
Login now