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
208 def call(form, opts, &block)
209   attr = opts[:attr] ? opts[:attr].dup : {}
210   Forme.attr_classes(attr, 'inputs')
211   if legend = opts[:legend]
212     form.tag(:fieldset, attr) do
213       form.emit(form.tag(:legend, opts[:legend_attr], legend))
214       yield
215     end
216   else
217     form.tag(:fieldset, attr, &block)
218   end
219 end