Fix form labels (#1004)

* Fix form labels

* Fix typo

* Change form builder

* Simplify label_html private method of StyledFormBuilder
This commit was merged in pull request #1004.
This commit is contained in:
Tony Vincent
2024-07-22 16:04:55 +02:00
committed by GitHub
parent 82568b4d8c
commit f62c5e43c3

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