Merge commit 'aea67d448b
' into kb_migration
This commit is contained in:
commit
bb2e964dca
74 changed files with 747 additions and 870 deletions
|
@ -30,9 +30,18 @@ module KmyblueComponent
|
|||
end
|
||||
end
|
||||
|
||||
module WarningHintComponent
|
||||
def warning_hint(_wrapper_options = nil)
|
||||
@warning_hint ||= begin
|
||||
options[:warning_hint].to_s.html_safe if options[:warning_hint].present?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
SimpleForm.include_component(AppendComponent)
|
||||
SimpleForm.include_component(RecommendedComponent)
|
||||
SimpleForm.include_component(KmyblueComponent)
|
||||
SimpleForm.include_component(WarningHintComponent)
|
||||
|
||||
SimpleForm.setup do |config|
|
||||
# Wrappers are used by the form builder to generate a
|
||||
|
@ -114,6 +123,7 @@ SimpleForm.setup do |config|
|
|||
b.use :html5
|
||||
b.use :label
|
||||
b.use :hint, wrap_with: { tag: :span, class: :hint }
|
||||
b.use :warning_hint, wrap_with: { tag: :span, class: [:hint, 'warning-hint'] }
|
||||
b.use :input, wrap_with: { tag: :div, class: :label_input }
|
||||
b.use :error, wrap_with: { tag: :span, class: :error }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue