Project

General

Profile

« Previous | Next » 

Revision a33142b9

Added by Dominic Cleal about 10 years ago

fixes #5038 - remove empty label causing template edit box indentation

View differences:

app/helpers/layout_helper.rb
content_tag :div, :class => "form-group #{error.empty? ? "" : 'has-error'}",
:id => options.delete(:control_group_id) do
label = options.delete(:label)
label = options[:label] == :none ? '' : options.delete(:label)
label ||= ((clazz = f.object.class).respond_to?(:gettext_translation_for_attribute_name) &&
s_(clazz.gettext_translation_for_attribute_name attr)) if f
label_tag(attr, label, :class => "col-md-2 control-label") +
content_tag(:div, :class => size_class) do
yield.html_safe + help_block.html_safe
end.html_safe + help_inline.html_safe
label = label.present? ? label_tag(attr, label, :class => "col-md-2 control-label") : ''
label.html_safe +
content_tag(:div, :class => size_class) do
yield.html_safe + help_block.html_safe
end.html_safe + help_inline.html_safe
end.html_safe
end
end

Also available in: Unified diff