0
0
Fork 0

Improving all forms

This commit is contained in:
Eugen Rochko 2016-10-18 16:37:15 +02:00
parent 6f7c9774c7
commit 43df35213e
16 changed files with 268 additions and 267 deletions

View file

@ -40,7 +40,7 @@ SimpleForm.setup do |config|
b.optional :readonly
## Inputs
b.use :label_input
b.use :input
b.use :hint, wrap_with: { tag: :span, class: :hint }
b.use :error, wrap_with: { tag: :span, class: :error }
@ -51,6 +51,14 @@ SimpleForm.setup do |config|
# b.use :full_error, wrap_with: { tag: :span, class: :error }
end
config.wrappers :with_label, class: :input,
hint_class: :field_with_hint, error_class: :field_with_errors do |b|
b.use :html5
b.use :hint, wrap_with: { tag: :span, class: :hint }
b.use :error, wrap_with: { tag: :span, class: :error }
b.use :label_input
end
# The default wrapper to be used by the FormBuilder.
config.default_wrapper = :default