[TwigBridge] Bootstrap Layout - Fix the label of checkbox cannot be empty
This commit is contained in:
parent
c9da1ae73f
commit
96896390d7
@ -164,12 +164,12 @@
|
|||||||
{% if parent_label_class is defined %}
|
{% if parent_label_class is defined %}
|
||||||
{% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ parent_label_class)|trim}) %}
|
{% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ parent_label_class)|trim}) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if label is empty %}
|
{% if label is not sameas(false) and label is empty %}
|
||||||
{% set label = name|humanize %}
|
{% set label = name|humanize %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
|
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
|
||||||
{{ widget|raw }}
|
{{ widget|raw }}
|
||||||
{{ label|trans({}, translation_domain) }}
|
{{ label is not sameas(false) ? label|trans({}, translation_domain) }}
|
||||||
</label>
|
</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock checkbox_radio_label %}
|
{% endblock checkbox_radio_label %}
|
||||||
|
Reference in New Issue
Block a user