mirror of
https://github.com/heartcombo/simple_form.git
synced 2022-11-09 12:19:26 -05:00
Add new wrapper to inline_form
This commit is contained in:
parent
731b561738
commit
2a1b514a52
1 changed files with 10 additions and 0 deletions
|
@ -95,6 +95,16 @@ SimpleForm.setup do |config|
|
|||
end
|
||||
end
|
||||
|
||||
config.wrappers :inline_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
||||
b.use :html5
|
||||
b.use :placeholder
|
||||
b.use :label, class: 'sr-only'
|
||||
|
||||
b.use :input, class: 'form-control'
|
||||
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
||||
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
||||
end
|
||||
|
||||
# Wrappers for forms and inputs using the Bootstrap toolkit.
|
||||
# Check the Bootstrap docs (http://getbootstrap.com)
|
||||
# to learn about the different styles for forms and inputs,
|
||||
|
|
Loading…
Reference in a new issue