diff options
Diffstat (limited to 'config/initializers/simple_form.rb')
| -rw-r--r-- | config/initializers/simple_form.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb index d5492e529..472863fa8 100644 --- a/config/initializers/simple_form.rb +++ b/config/initializers/simple_form.rb @@ -5,8 +5,9 @@ SimpleForm.setup do |config| # wrapper, change the order or even add your own to the # stack. The options given below are used to wrap the # whole input. - config.wrappers :default, class: :input, - hint_class: :field_with_hint, error_class: :field_with_errors do |b| + config.wrappers :default, class: 'form-group', + error_class: 'has-error' do |b| + # hint_class: :field_with_hint, error_class: :field_with_errors do |b| ## Extensions enabled by default # Any of these extensions can be disabled for a # given input by passing: `f.input EXTENSION_NAME => false`. @@ -41,8 +42,8 @@ SimpleForm.setup do |config| ## Inputs b.use :label_input - b.use :hint, wrap_with: { tag: :span, class: :hint } b.use :error, wrap_with: { tag: :span, class: :error } + b.use :hint, wrap_with: { tag: :span, class: :hint } ## full_messages_for # If you want to display the full error message for the attribute, you can @@ -72,7 +73,7 @@ SimpleForm.setup do |config| config.error_notification_tag = :div # CSS class to add for error notification helper. - config.error_notification_class = 'error_notification' + config.error_notification_class = 'alert alert-error' # ID to add for error notification helper. # config.error_notification_id = nil @@ -90,25 +91,24 @@ SimpleForm.setup do |config| # config.collection_wrapper_class = nil # You can wrap each item in a collection of radio/check boxes with a tag, - # defaulting to :span. Please note that when using :boolean_style = :nested, - # SimpleForm will force this option to be a label. + # defaulting to :span. # config.item_wrapper_tag = :span # You can define a class to use in all item wrappers. Defaulting to none. # config.item_wrapper_class = nil # How the label text should be generated altogether with the required text. - # config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" } + config.label_text = lambda { |label, required, explicit_label| "#{label} #{required}" } # You can define the class to use on all labels. Default is nil. # config.label_class = nil # You can define the default class to be used on forms. Can be overriden # with `html: { :class }`. Defaulting to none. - # config.default_form_class = nil + config.default_form_class = 'form' # You can define which elements should obtain additional classes - # config.generate_additional_classes_for = [:wrapper, :label, :input] + config.generate_additional_classes_for = [:label, :input] # Whether attributes are required by default (or not). Default is true. # config.required_by_default = true |
