]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Resources/views/form/form_div_layout.html.twig
Removed
[airbundle] / Resources / views / form / form_div_layout.html.twig
index 7f73c516294d084f4e281bd683894f7e40c49948..9270f0e08e6e1d2894d30b4c9a233e55d8a8725e 100644 (file)
         {%- 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 -%}
-                {{- 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 -%}
 {%- endblock repeated_row -%}
 
 {%- block form_row -%}
-    <div>
+    <div class="row">
         {{- form_label(form) -}}
-        <section>
+        <div>
             {{- form_widget(form) -}}
             {%- if errors|length > 0 -%}
-                <div class="error">
+                <div class="message error">
                     {{- form_errors(form) -}}
                 </div>
             {%- endif -%}
-        </section>
+        </div>
     </div>
 {%- endblock form_row -%}
 
     {%- if form_method != method -%}
         <input type="hidden" name="_method" value="{{ method }}" />
     {%- endif -%}
+    {%- if errors|length > 0 -%}
+        <header class="message error">
+                       {{- form_errors(form) -}}
+        </header>
+    {%- endif -%}
 {%- endblock form_start -%}
 
 {%- block form_end -%}