diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-02-06 17:48:38 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-02-06 17:48:38 +0000 |
commit | 06b1198736498f2ba97b5e0a38f3264d45201aeb (patch) | |
tree | 41c1aa2b8242d80915d67b47732fe52cc4fc71c7 /actionpack/test | |
parent | 9f31ecb4c98fd4c50bb5e6624af2b4b866e96afd (diff) | |
download | rails-06b1198736498f2ba97b5e0a38f3264d45201aeb.tar.gz rails-06b1198736498f2ba97b5e0a38f3264d45201aeb.tar.bz2 rails-06b1198736498f2ba97b5e0a38f3264d45201aeb.zip |
Fix that FormTagHelper#submit_tag using :disable_with should trigger the onsubmit handler of its form if available [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6134 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-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 dc36d23604..e7fd3b0823 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...';this.form.submit();alert('hello!')" />), + %(<input name='commit' type='submit' value='Save' onclick="this.disabled=true;this.value='Saving...';alert('hello!');return (this.form.onsubmit ? this.form.onsubmit() : true)" />), submit_tag("Save", :disable_with => "Saving...", :onclick => "alert('hello!')") ) end |