Skip to content

Commit

Permalink
#21 error class changed
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdilek committed Sep 5, 2013
1 parent d62da34 commit f07214a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions config/initializers/simple_form_bootstrap.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Use this setup block to configure all options available in SimpleForm.
# File Path: RAILS_ROOT/config/initializers/simple_form_bootstrap.rb
SimpleForm.setup do |config|
config.wrappers :bootstrap, tag: 'div', class: 'form-group', error_class: 'error' do |b|
config.wrappers :bootstrap, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
b.use :html5
b.use :placeholder
b.use :label, class: 'control-label'
b.use :input
b.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
end

config.wrappers :prepend, tag: 'div', class: 'form-group', error_class: 'error' do |b|
config.wrappers :prepend, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
b.use :html5
b.use :placeholder
b.use :label, class: 'control-label'
Expand All @@ -23,7 +23,7 @@
end
end

config.wrappers :append, tag: 'div', class: 'form-group', error_class: 'error' do |b|
config.wrappers :append, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
b.use :html5
b.use :placeholder
b.use :label
Expand All @@ -35,6 +35,7 @@
input.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
end
end
config.error_notification_class = 'alert alert-danger'

# Wrappers for forms and inputs using the Twitter Bootstrap toolkit.
# Check the Bootstrap docs (http://twitter.github.com/bootstrap)
Expand Down

0 comments on commit f07214a

Please sign in to comment.