Changeset 6134
- Timestamp:
- 02/06/07 17:48:38 (2 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_view/helpers/form_tag_helper.rb (modified) (1 diff)
- trunk/actionpack/test/template/form_tag_helper_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r6130 r6134 1 1 *SVN* 2 2 3 # Fix #render_file so that TemplateError is called with the correct params and you don't get the WSOD. [Rick] 3 * Fix that FormTagHelper#submit_tag using :disable_with should trigger the onsubmit handler of its form if available [DHH] 4 5 * Fix #render_file so that TemplateError is called with the correct params and you don't get the WSOD. [Rick] 4 6 5 7 * Fix issue with deprecation messing up #template_root= usage. Add #prepend_view_path and #append_view_path to allow modification of a copy of the trunk/actionpack/lib/action_view/helpers/form_tag_helper.rb
r6057 r6134 142 142 143 143 if disable_with = options.delete("disable_with") 144 options["onclick"] = "this.disabled=true;this.value='#{disable_with}';this.form.submit();#{options["onclick"]}" 144 options["onclick"] = [ 145 "this.disabled=true", 146 "this.value='#{disable_with}'", 147 "#{options["onclick"]}", 148 "return (this.form.onsubmit ? this.form.onsubmit() : true)", 149 ].join(";") 145 150 end 146 151 trunk/actionpack/test/template/form_tag_helper_test.rb
r6057 r6134 133 133 def test_submit_tag 134 134 assert_dom_equal( 135 %(<input name='commit' type='submit' value='Save' onclick="this.disabled=true;this.value='Saving...'; this.form.submit();alert('hello!')" />),135 %(<input name='commit' type='submit' value='Save' onclick="this.disabled=true;this.value='Saving...';alert('hello!');return (this.form.onsubmit ? this.form.onsubmit() : true)" />), 136 136 submit_tag("Save", :disable_with => "Saving...", :onclick => "alert('hello!')") 137 137 )