Permalink
Browse files

use different ID's for checkbox and hidden field with the real value,…

… because this may be cause of JS error when working with element ID's
  • Loading branch information...
ptzn committed Jan 16, 2010
1 parent 40aca01 commit 625e756ba8fefb64fee06102f58ac5cd6ccb2196
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/semantic_fields_renderer.rb
@@ -50,7 +50,7 @@ def check_box_tag(name, options = {})
options[:class] = append_class_name(options[:class], 'checkbox')
html << content_tag(:dd) do
checked = options.delete(:value).to_s != 'false'
- @super.hidden_field_tag(name, "0") +
+ @super.hidden_field_tag(name, "0", :id => "#{options[:id]}_hidden") +
@super.check_box_tag(name, "1", checked, options)
end
end

0 comments on commit 625e756

Please sign in to comment.