From 4c330a1241aa4d92aebad32f6bc7859efd42ea3b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 14 Apr 2012 04:58:46 +0000 Subject: [PATCH] Merged r9391 from trunk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@9403 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/javascripts/application.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 483bc1a68..c95c34da6 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -520,4 +520,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(); + }); + }); + }); +} + Event.observe(window, 'load', hideOnLoad); +Event.observe(window, 'load', addFormObserversForDoubleSubmit); -- 2.39.5