Rapsys Git
/
airbundle
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac34727
)
Add form global errors in a header block
author
Raphaël Gertz
<git@rapsys.eu>
Wed, 11 Dec 2019 04:30:58 +0000
(
05:30
+0100)
committer
Raphaël Gertz
<git@rapsys.eu>
Wed, 11 Dec 2019 04:30:58 +0000
(
05:30
+0100)
Resources/views/form/form_div_layout.html.twig
patch
|
blob
|
history
diff --git
a/Resources/views/form/form_div_layout.html.twig
b/Resources/views/form/form_div_layout.html.twig
index 7f73c516294d084f4e281bd683894f7e40c49948..dfc79b3eb5494c83c801b2145eabcf186ff2f456 100644
(file)
--- a/
Resources/views/form/form_div_layout.html.twig
+++ b/
Resources/views/form/form_div_layout.html.twig
@@
-337,6
+337,13
@@
{%- if form_method != method -%}
<input type="hidden" name="_method" value="{{ method }}" />
{%- endif -%}
+ {%- if errors|length > 0 -%}
+ <header>
+ <div class="error">
+ {{- form_errors(form) -}}
+ </div>
+ </header>
+ {%- endif -%}
{%- endblock form_start -%}
{%- block form_end -%}