]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Resources/views/form/form_div_layout.html.twig
Disable controller resolver auto mapping
[airbundle] / Resources / views / form / form_div_layout.html.twig
index 29ec4014e053b9add2d277cb9702cd10e352450d..61c8a03593e14762c9146b2644621fce9f6624c7 100644 (file)
 {%- endblock choice_widget -%}
 
 {%- block choice_widget_expanded -%}
 {%- endblock choice_widget -%}
 
 {%- block choice_widget_expanded -%}
-    <div {{ block('widget_container_attributes') }}>
     {%- for child in form %}
     {%- for child in form %}
-        {{- form_widget(child) -}}
-        {{- form_label(child, null, {translation_domain: choice_translation_domain}) -}}
+               <div class="row" {{ block('widget_container_attributes') }}>
+                       {{- form_label(child, null, {translation_domain: choice_translation_domain}) -}}
+                       <div>
+                               {{- form_widget(child) -}}
+                       </div>
+               </div>
     {% endfor -%}
     {% endfor -%}
-    </div>
 {%- endblock choice_widget_expanded -%}
 
 {%- block choice_widget_collapsed -%}
 {%- endblock choice_widget_expanded -%}
 
 {%- block choice_widget_collapsed -%}
         {%- endif -%}
         <{{ element|default('label') }}{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}>
             {%- if translation_domain is same as(false) -%}
         {%- endif -%}
         <{{ element|default('label') }}{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}>
             {%- if translation_domain is same as(false) -%}
-                {{- label -}}
+                               {%- if label_html is same as(false) -%}
+                                       {{- label -}}
+                               {%- else -%}
+                                       {{- label|raw -}}
+                               {%- endif -%}
             {%- else -%}
             {%- else -%}
-                {{- label|trans({}, translation_domain) -}}
+                               {%- if label_html is same as(false) -%}
+                                       {{- label|trans({}, translation_domain) -}}
+                               {%- else -%}
+                                       {{- label|trans({}, translation_domain)|raw -}}
+                               {%- endif -%}
             {%- endif -%}
         </{{ element|default('label') }}>
     {%- endif -%}
             {%- endif -%}
         </{{ element|default('label') }}>
     {%- endif -%}
 {%- endblock repeated_row -%}
 
 {%- block form_row -%}
 {%- endblock repeated_row -%}
 
 {%- block form_row -%}
-    <div>
+    <div class="row">
         {{- form_label(form) -}}
         {{- form_label(form) -}}
-        <section>
+        <div>
             {{- form_widget(form) -}}
             {%- if errors|length > 0 -%}
                 <div class="message error">
                     {{- form_errors(form) -}}
                 </div>
             {%- endif -%}
             {{- form_widget(form) -}}
             {%- if errors|length > 0 -%}
                 <div class="message error">
                     {{- form_errors(form) -}}
                 </div>
             {%- endif -%}
-        </section>
+        </div>
     </div>
 {%- endblock form_row -%}
 
 {%- block button_row -%}
     </div>
 {%- endblock form_row -%}
 
 {%- block button_row -%}
-    <div>
+    <div class="row">
         {{- form_widget(form) -}}
     </div>
 {%- endblock button_row -%}
         {{- form_widget(form) -}}
     </div>
 {%- endblock button_row -%}
         <input type="hidden" name="_method" value="{{ method }}" />
     {%- endif -%}
     {%- if errors|length > 0 -%}
         <input type="hidden" name="_method" value="{{ method }}" />
     {%- endif -%}
     {%- if errors|length > 0 -%}
-        <header>
-            <div class="message error">
-                {{- form_errors(form) -}}
-            </div>
+        <header class="message error">
+                       {{- form_errors(form) -}}
         </header>
     {%- endif -%}
 {%- endblock form_start -%}
         </header>
     {%- endif -%}
 {%- endblock form_start -%}