diff options
author | Jamis Buck <jamis@37signals.com> | 2007-02-28 22:18:50 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2007-02-28 22:18:50 +0000 |
commit | b1ff3b48e27f85bce35857c02d1d90297bb0db5f (patch) | |
tree | 44206c7c6203cdf8e72bdb6148b1997f15796c17 /actionpack/test/template | |
parent | 62ac3279e87c1c9a9bf669d1cc98b660d06b7667 (diff) | |
download | rails-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/test/template')
-rw-r--r-- | actionpack/test/template/form_tag_helper_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb index cc5ab1e7f4..283a86902f 100644 --- a/actionpack/test/template/form_tag_helper_test.rb +++ b/actionpack/test/template/form_tag_helper_test.rb @@ -132,7 +132,7 @@ class FormTagHelperTest < Test::Unit::TestCase def test_submit_tag assert_dom_equal( - %(<input name='commit' type='submit' value='Save' onclick="this.disabled=true;this.value='Saving...';alert('hello!');return (this.form.onsubmit ? (this.form.onsubmit() ? this.form.submit() : false) : this.form.submit())" />), + %(<input name='commit' type='submit' value='Save' onclick="this.setAttribute('originalValue', this.value);this.disabled=true;this.value='Saving...';alert('hello!');return (this.form.onsubmit ? (this.form.onsubmit() ? this.form.submit() : false) : this.form.submit())" />), submit_tag("Save", :disable_with => "Saving...", :onclick => "alert('hello!')") ) end |