aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/form_tag_helper.rb
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2007-02-28 22:18:50 +0000
committerJamis Buck <jamis@37signals.com>2007-02-28 22:18:50 +0000
commitb1ff3b48e27f85bce35857c02d1d90297bb0db5f (patch)
tree44206c7c6203cdf8e72bdb6148b1997f15796c17 /actionpack/lib/action_view/helpers/form_tag_helper.rb
parent62ac3279e87c1c9a9bf669d1cc98b660d06b7667 (diff)
downloadrails-b1ff3b48e27f85bce35857c02d1d90297bb0db5f.tar.gz
rails-b1ff3b48e27f85bce35857c02d1d90297bb0db5f.tar.bz2
rails-b1ff3b48e27f85bce35857c02d1d90297bb0db5f.zip
Set the original button value in an attribute of the button when using the :disable_with key with submit_tag
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6270 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/helpers/form_tag_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/form_tag_helper.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb
index 342c457917..56479dfa04 100644
--- a/actionpack/lib/action_view/helpers/form_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -142,6 +142,7 @@ module ActionView
if disable_with = options.delete("disable_with")
options["onclick"] = [
+ "this.setAttribute('originalValue', this.value)",
"this.disabled=true",
"this.value='#{disable_with}'",
"#{options["onclick"]}",