From 1c3893d68e8cdbe1503dcca873f1ede32fa6cdbb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Mon, 11 Dec 2023 07:03:27 +0100 Subject: [PATCH 1/1] Add form_theme template --- Resources/views/form/form_div_layout.html.twig | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Resources/views/form/form_div_layout.html.twig diff --git a/Resources/views/form/form_div_layout.html.twig b/Resources/views/form/form_div_layout.html.twig new file mode 100644 index 0000000..a0ca49f --- /dev/null +++ b/Resources/views/form/form_div_layout.html.twig @@ -0,0 +1,17 @@ +{# vendor/symfony/twig-bridge/Resources/views/Form/form_div_layout.html.twig #} +{% use "form_div_layout.html.twig" %} + +{%- block form_row -%} + {%- set widget_attr = {} -%} + {%- if help is not empty -%} + {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} + {%- endif -%} + + {{- form_label(form) -}} +
+ {{- form_widget(form, widget_attr) -}} + {{- form_errors(form) -}} + {{- form_help(form) -}} +
+ +{%- endblock form_row -%} -- 2.41.1