{% extends 'form_div_layout.html.twig' %}

{% block field_label %}
{% spaceless %}
    {% set attr = attr|merge({'class': attr.class|default('') ~ ' control-label'}) %}
    {% set attr = attr|merge({'for': id}) %}
    {{ block('generic_label') }}
{% endspaceless %}
{% endblock field_label %}

{% block field_row %}
{% spaceless %}
    <div class="control-group">
        {{ form_label(form, label|default(null)) }}
        {{ form_errors(form) }}
        <div class="controls">
            {{ form_widget(form) }}            
        </div>
    </div>
{% endspaceless %}
{% endblock field_row %}

{% extends 'form_div_layout.html.twig' %}

{% block form_label %}
{% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' control-label')|trim}) %}
{{parent()}}
{% endblock %}

{% block form_row %}
{% spaceless %}
    <div class="control-group">
        {{ form_label(form, label|default(null)) }}
        {#
        If the child is a compound form, the errors are rendered inside
        the container. See also block form_rows.
        #}
        {% if not compound %}
            {{ form_errors(form) }}
        {% endif %}
        <div class="controls">
            {{ form_widget(form) }}            
        </div>
    </div>
{% endspaceless %}
{% endblock form_row %}

Update Form theme file for Symfony 2.1 (fix deprecations)
Update Form theme file for Symfony 2.1 (fix deprecations)
