Created
February 14, 2016 10:57
-
-
Save avtehnik/131abc2d66c21ea5c9f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% form_theme register _self %} | |
{% block checkbox_row %} | |
{% spaceless %} | |
<div class="form-group"> | |
<div class="checkbox"> | |
{{ form_errors(form) }} | |
<label class="control-label required" for="{{ form.vars.id }}"> | |
<input type="checkbox" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}/> | |
{{ label|default(form_label(form)) | raw }} | |
</label> | |
</div> | |
</div> | |
{% endspaceless %} | |
{% endblock %} | |
{% block checkbox_widget -%} | |
{% set parent_label_class = parent_label_class|default('') -%} | |
{% if 'checkbox-inline' in parent_label_class %} | |
{{- form_label(form, null, { widget: parent() }) -}} | |
{% else -%} | |
<div class="checkbox"> | |
{{- form_label(form, null, { widget: parent() }) -}} | |
</div> | |
{%- endif %} | |
{%- endblock checkbox_widget %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment