Sha256: b28479412fc8ba512964cc5e2d0d930c761164c310d83c8e2c66cd98f40287ce

Contents?: true

Size: 947 Bytes

Versions: 25

Compression:

Stored size: 947 Bytes

Contents

# frozen_string_literal: true

# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
  config.wrappers :default, class: :input,
                            hint_class: :field_with_hint,
                            error_class: :field_with_errors do |b|
    b.use :html5
    b.use :placeholder
    b.optional :maxlength
    b.optional :pattern
    b.optional :min_max
    b.optional :readonly
    b.use :label
    b.use :hint,  wrap_with: { tag: :span, class: :hint }
    b.use :error, wrap_with: { tag: :span, class: :error }
    b.use :input
  end

  config.default_wrapper = :default
  config.boolean_style = :nested
  config.button_class = 'btn'
  config.error_notification_tag = :div
  config.error_notification_class = 'error_notification'
  config.label_text = ->(label, required, _) { "#{label} #{required}" }
  config.browser_validations = true
  config.boolean_label_class = 'checkbox'
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
hyrax-5.0.2 .dassie/config/initializers/simple_form.rb
hyrax-5.0.1 .dassie/config/initializers/simple_form.rb
hyrax-5.0.0 .dassie/config/initializers/simple_form.rb
hyrax-5.0.0.rc3 .dassie/config/initializers/simple_form.rb
hyrax-5.0.0.rc2 .dassie/config/initializers/simple_form.rb
hyrax-5.0.0.rc1 .dassie/config/initializers/simple_form.rb
hyrax-3.6.0 .dassie/config/initializers/simple_form.rb
hyrax-4.0.0 .dassie/config/initializers/simple_form.rb
hyrax-4.0.0.rc3 .dassie/config/initializers/simple_form.rb
hyrax-4.0.0.rc2 .dassie/config/initializers/simple_form.rb
hyrax-4.0.0.rc1 .dassie/config/initializers/simple_form.rb
hyrax-3.5.0 .dassie/config/initializers/simple_form.rb
hyrax-4.0.0.beta2 .dassie/config/initializers/simple_form.rb
hyrax-3.4.2 .dassie/config/initializers/simple_form.rb
hyrax-4.0.0.beta1 .dassie/config/initializers/simple_form.rb
hyrax-3.4.1 .dassie/config/initializers/simple_form.rb
hyrax-3.4.0 .dassie/config/initializers/simple_form.rb
hyrax-3.3.0 .dassie/config/initializers/simple_form.rb
hyrax-3.2.0 .dassie/config/initializers/simple_form.rb
hyrax-3.1.0 .dassie/config/initializers/simple_form.rb