{% block form_row -%}
    <div class="col-md-12">
        {{ form_label(form) }}
        {{ form_widget(form) }}
        {% if form.vars.help is defined and form.vars.help is not empty %}
            <span class="help-block">{{ form.vars.help }}</span>
        {% endif %}
    </div>
{% endblock %}

{% block calendar_row %}

    <div class="form-group {{ (form.vars.errors|length) ? 'has-error' }}">

        {% set labelClass = label_attr.class is defined ? container_attr.class : 'col-md-3' %}

        {{- form_label(form) -}}

        <div {{ block('widget_container_attributes') }}>
            <div class="input-group date form_datetime" data-format="dd-mm-yyyy hh:ii:ss" data-date="{{ 'now'|date("d-m-Y H:i:s") }}">

                {{ form_widget(form, { attr:{size:16}}) }}

                <span class="input-group-btn">
                    <button class="btn default date-reset" type="button"><i class="fa fa-times"></i></button>
                </span>
                <span class="input-group-btn">
                    <button class="btn default date-set" type="button"><i class="fa fa-calendar"></i></button>
                </span>
            </div>

            {% if help %}<p class="help-block">{{ (translatable ? help|trans : help)|raw }}</p>{% endif %}

            {{ form_errors(form) }}
        </div>
    </div>
{% endblock %}

{% block choice_widget -%}
    {% if form.vars.view_type == "format" %}
        <div {{ block('widget_container_attributes') }}>
            {% for child in form %}
                <label class="radio-inline" for="{{ child.vars.id }}">
                    <img src="{{ asset(child.vars.label) }}" alt=""/>
                    <span>
                        <input type="radio" id="{{ child.vars.id }}" name="{{ child.vars.full_name }}" value="{{ child.vars.value }}" {% if child.vars.required %}required="required" {% endif %} {% if form.vars.data == child.vars.value %} checked="checked" {% endif %}>
                    </span>
                </label>
                {% if form.vars.help is defined and form.vars.help is not empty %}
                    <span class="help-block">{{ form.vars.help }}</span>
                {% endif %}
            {% endfor %}
        </div>
    {% else %}
        <select class="col-md-12" name="{{ form.vars.full_name }}" id="{{ form.vars.id }}" {% if required %}required="required" {% endif %} {% if multiple %}multiple{% endif %}>
            {% set options = choices %}
            {{ block('choice_widget_options') }}
        </select>
        {% if form.vars.help is defined and form.vars.help is not empty %}
            <span class="help-block">{{ form.vars.help }}</span>
        {% endif %}
    {% endif %}

{% endblock %}
