Fix error classes

This commit is contained in:
Rafael Mendonça França 2014-03-24 23:04:09 -03:00
parent ec038b10a7
commit a685ba45e0
1 changed files with 8 additions and 9 deletions

View File

@ -1,6 +1,5 @@
# Use this setup block to configure all options available in SimpleForm. # Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config| SimpleForm.setup do |config|
config.error_notification_class = 'alert alert-error'
config.button_class = 'btn btn-default' config.button_class = 'btn btn-default'
config.boolean_label_class = nil config.boolean_label_class = nil
@ -11,7 +10,7 @@ SimpleForm.setup do |config|
b.wrapper tag: 'div' do |ba| b.wrapper tag: 'div' do |ba|
ba.use :input, class: 'form-control' ba.use :input, class: 'form-control'
ba.use :error, wrap_with: { tag: 'span', class: 'help-inline' } ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' } ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
end end
end end
@ -23,7 +22,7 @@ SimpleForm.setup do |config|
b.wrapper tag: 'div' do |ba| b.wrapper tag: 'div' do |ba|
ba.use :input ba.use :input
ba.use :error, wrap_with: { tag: 'span', class: 'help-inline' } ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' } ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
end end
end end
@ -36,7 +35,7 @@ SimpleForm.setup do |config|
ba.use :label_input ba.use :label_input
end end
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' } b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
end end
@ -44,7 +43,7 @@ SimpleForm.setup do |config|
b.use :html5 b.use :html5
b.use :placeholder b.use :placeholder
b.use :label_input b.use :label_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' } b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
end end
@ -55,7 +54,7 @@ SimpleForm.setup do |config|
b.wrapper tag: 'div', class: 'col-sm-9' do |ba| b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
ba.use :input, class: 'form-control' ba.use :input, class: 'form-control'
ba.use :error, wrap_with: { tag: 'span', class: 'help-inline' } ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' } ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
end end
end end
@ -67,7 +66,7 @@ SimpleForm.setup do |config|
b.wrapper tag: 'div', class: 'col-sm-9' do |ba| b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
ba.use :input ba.use :input
ba.use :error, wrap_with: { tag: 'span', class: 'help-inline' } ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' } ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
end end
end end
@ -81,7 +80,7 @@ SimpleForm.setup do |config|
ba.use :label_input, class: 'col-sm-9' ba.use :label_input, class: 'col-sm-9'
end end
wr.use :error, wrap_with: { tag: 'span', class: 'help-inline' } wr.use :error, wrap_with: { tag: 'span', class: 'help-block' }
wr.use :hint, wrap_with: { tag: 'p', class: 'help-block' } wr.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
end end
end end
@ -94,7 +93,7 @@ SimpleForm.setup do |config|
b.wrapper tag: 'div', class: 'col-sm-9' do |ba| b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
ba.use :input ba.use :input
ba.use :error, wrap_with: { tag: 'span', class: 'help-inline' } ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' } ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
end end
end end