Sha256: d6ca23d84e6ee9c0460590b5279a91793fc1d2802598698cbe865fac4f213ab9

Contents?: true

Size: 1.16 KB

Versions: 4

Compression:

Stored size: 1.16 KB

Contents

SimpleForm.setup do |config|

  config.wrappers :default,
                  :tag         => 'div',
                  :class       => [:clearfix ,:field_container],
                  :hint_class  => :field_with_hint,
                  :error_class => :error do |wrapper|

    wrapper.use :label_input
    wrapper.use :hint, :wrap_with => { :tag => :span, :class => :hint }
    #b.use :error, :wrap_with => { :tag => :span, :class => :error }
  end

  config.wrappers :full_width,
                  :tag         => 'div',
                  :class       => [:clearfix ,:field_container, :full_width],
                  :hint_class  => :field_with_hint,
                  :error_class => :error do |wrapper|

    wrapper.use :label_input
    wrapper.use :hint, :wrap_with => { :tag => :span, :class => :hint }
    #b.use :error, :wrap_with => { :tag => :span, :class => :error }
  end

  config.wrappers :non_persistence_fields,
                  :tag         => :div,
                  :class       => [:clearfix],
                  :error_class => :error do |wrapper|
    wrapper.use :label
  end

  SimpleForm.default_form_class = "form-stacked"
  SimpleForm.browser_validations = false
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bootstrap_admin-1.0.1 config/initializers/simple_form.rb
bootstrap_admin-1.0.0 config/initializers/simple_form.rb
bootstrap_admin-0.0.18 config/initializers/simple_form.rb
bootstrap_admin-0.0.17 config/initializers/simple_form.rb