Module: Bh::Form::LegendHelper

Includes:
BaseHelper
Defined in:
lib/bh/core_ext/rails/form/legend_helper.rb

Instance Method Summary collapse

Methods included from Helpers

#alert_box, #bootstrap_css, #bootstrap_js, #bootstrap_theme_css, #button, #button_to, #dropdown, #font_awesome_css, #glyphicon, #horizontal, #icon, #link_to, #modal, #nav, #navbar, #panel, #panel_row, #progress_bar, #vertical

Instance Method Details

#legend(value, options = {}) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/bh/core_ext/rails/form/legend_helper.rb', line 8

def legend(value, options = {})
  append_class! options, 'sr-only' if inline_form?
  text =  :legend, value, options
  text =  :div, text, class: 'col-sm-12' if horizontal_form?
  text = label_and_field_container(text, :legend) unless inline_form?
  text
end