[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 %}
|
{% if required %}
|
||||||
{% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %}
|
{% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if label is not sameas(false) %}
|
||||||
{% if label is empty %}
|
{% if label is empty %}
|
||||||
{% set label = name|humanize %}
|
{% set label = name|humanize %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>{{ label|trans({}, translation_domain) }}</label>
|
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>{{ label|trans({}, translation_domain) }}</label>
|
||||||
|
{% endif %}
|
||||||
{% endspaceless %}
|
{% endspaceless %}
|
||||||
{% endblock form_label %}
|
{% endblock form_label %}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user