Module: ExtForm::Wrappers::Mixin

Extended by:
ActiveSupport::Concern
Included in:
ManyMixin, SingleMixin
Defined in:
lib/ext_form/wrappers/mixin.rb

Instance Method Summary collapse

Instance Method Details

#wrap_style_options(input, type, namespace) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/ext_form/wrappers/mixin.rb', line 6

def wrap_style_options(input, type, namespace)
  l = input.l
  options = input.options

  if l.instance_of?(ExtForm::Layouts::DefaultLayout)
    default_style_options(l, type, namespace, options)
    input.input_html_classes.unshift('input-with-layout') if type == 'input'
  else
    bootstrap_style_options(l, type, namespace, options)
    input.input_html_classes.unshift(options[:"#{namespace}_html"][:class]) if type == 'input'
  end
end