class Forme::InputsWrapper::Bootstrap3

  1. lib/forme/bs3.rb
Superclass: Object

Use a <fieldset> tag to wrap the inputs.

Registered as :bs3.

Methods

Public Instance

  1. call

Public Instance methods

call (form, opts, &block)
[show source]
# File lib/forme/bs3.rb, line 212
def call(form, opts, &block)
  attr = opts[:attr] ? opts[:attr].dup : {}
  Forme.attr_classes(attr, 'inputs')
  if legend = opts[:legend]
    form.tag(:fieldset, attr) do
      form.emit(form.tag(:legend, opts[:legend_attr], legend))
      yield
    end
  else
    form.tag(:fieldset, attr, &Proc.new)
  end
end