mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-20 13:49:39 +02:00
Fix form labels (#1004)
* Fix form labels * Fix typo * Change form builder * Simplify label_html private method of StyledFormBuilder
This commit is contained in:
parent
82568b4d8c
commit
f62c5e43c3
1 changed files with 4 additions and 1 deletions
|
@ -50,6 +50,9 @@ class StyledFormBuilder < ActionView::Helpers::FormBuilder
|
|||
end
|
||||
|
||||
def label_html(method, options)
|
||||
options[:label] ? label(method, options[:label], class: "form-field__label") : "".html_safe
|
||||
return label(method, class: "form-field__label") if options[:label] == true
|
||||
return "".html_safe unless options[:label]
|
||||
|
||||
label(method, options[:label], class: "form-field__label")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue