[Form] Option for not displaying a label by setting label to false.
[Form] Fixed formatting & translation ..
This commit is contained in:
parent
1ec59f174e
commit
36e4556805
@ -227,10 +227,12 @@
|
||||
{% if required %}
|
||||
{% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %}
|
||||
{% endif %}
|
||||
{% if label is not sameas(false) %}
|
||||
{% if label is empty %}
|
||||
{% set label = name|humanize %}
|
||||
{% endif %}
|
||||
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>{{ label|trans({}, translation_domain) }}</label>
|
||||
{% endif %}
|
||||
{% endspaceless %}
|
||||
{% endblock form_label %}
|
||||
|
||||
|
Reference in New Issue
Block a user