1
0
Fork 0
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:
Tony Vincent 2024-07-22 16:04:55 +02:00 committed by GitHub
parent 82568b4d8c
commit f62c5e43c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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