Module: JqueryUiForm::Helpers::WrapperHelper
- Included in:
- FormBuilder
- Defined in:
- lib/jquery_ui_form/helpers/wrapper_helper.rb
Instance Method Summary collapse
- #buttons(options = {}, &block) ⇒ Object
- #column(options = {}, &block) ⇒ Object
- #fieldset(*args, &block) ⇒ Object
- #row(options = {}, &block) ⇒ Object
- #wrapper(*args, &block) ⇒ Object
Instance Method Details
#buttons(options = {}, &block) ⇒ Object
34 35 36 37 |
# File 'lib/jquery_ui_form/helpers/wrapper_helper.rb', line 34 def ( = {}, &block) [:mode] = "buttons" wrapper(, &block) end |
#column(options = {}, &block) ⇒ Object
24 25 26 27 |
# File 'lib/jquery_ui_form/helpers/wrapper_helper.rb', line 24 def column( = {}, &block) [:mode] = "column" wrapper(, &block) end |
#fieldset(*args, &block) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/jquery_ui_form/helpers/wrapper_helper.rb', line 13 def fieldset(*args, &block) legend = "" legend = args.shift unless args.first.is_a?(Hash) = args. [:class] = "#{[:class]} ui-fieldset" template.content_tag(:fieldset,) do template.concat(template.content_tag(:legend, legend, [:html_legend])) unless legend.blank? yield end end |
#row(options = {}, &block) ⇒ Object
29 30 31 32 |
# File 'lib/jquery_ui_form/helpers/wrapper_helper.rb', line 29 def row( = {}, &block) [:mode] = "row" wrapper(, &block) end |
#wrapper(*args, &block) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/jquery_ui_form/helpers/wrapper_helper.rb', line 5 def wrapper(*args, &block) = args. [:class] = "#{[:class]} ui-form-#{.delete(:mode) || 'wrapper'}" template.content_tag(:div, ) do yield end end |