Skip to content

Commit

Permalink
Fixes #12280 - fix label for field helper
Browse files Browse the repository at this point in the history
  • Loading branch information
ares authored and Dominic Cleal committed Oct 29, 2015
1 parent a0218e6 commit f72212f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions app/helpers/layout_helper.rb
Expand Up @@ -239,13 +239,15 @@ def field(f, attr, options = {})
help_block = content_tag(:span, options.delete(:help_block), :class => "help-block")

content_tag(:div, :class => "clearfix") do
content_tag :div, :class => "#{wrapper_class} #{error.empty? ? "" : 'has-error'}",
:id => options.delete(:control_group_id) do
input = if options[:fullscreen]
content_tag(:div, yield.html_safe + fullscreen_input, :class => "input-group")
else
yield.html_safe
end
content_tag(:div, :class => "#{wrapper_class} #{error.empty? ? "" : 'has-error'}",
:id => options.delete(:control_group_id)) do
input = capture do
if options[:fullscreen]
content_tag(:div, yield.html_safe + fullscreen_input, :class => "input-group")
else
yield.html_safe
end
end
add_help_to_label(size_class, label, help_inline) do
input + help_block.html_safe
end
Expand Down

0 comments on commit f72212f

Please sign in to comment.