Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #12280 - fix label for field helper #2863

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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