Skip to content

Commit

Permalink
bug #13806 [TwigBridge] Bootstrap Layout - Fix the label of checkbox …
Browse files Browse the repository at this point in the history
…cannot be empty (ogizanagi)

This PR was merged into the 2.6 branch.

Discussion
----------

[TwigBridge] Bootstrap Layout - Fix the label of checkbox cannot be empty

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #13803
| License       | MIT

Commits
-------

9689639 [TwigBridge] Bootstrap Layout - Fix the label of checkbox cannot be empty
  • Loading branch information
fabpot committed Mar 5, 2015
2 parents 0cead0f + 9689639 commit 700447d
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -164,12 +164,12 @@
{% if parent_label_class is defined %}
{% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ parent_label_class)|trim}) %}
{% endif %}
{% if label is empty %}
{% if label is not sameas(false) and label is empty %}
{% set label = name|humanize %}
{% endif %}
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
{{ widget|raw }}
{{ label|trans({}, translation_domain) }}
{{ label is not sameas(false) ? label|trans({}, translation_domain) }}
</label>
{% endif %}
{% endblock checkbox_radio_label %}
Expand Down

0 comments on commit 700447d

Please sign in to comment.