From: Raphaƫl Gertz Date: Mon, 11 Dec 2023 06:03:27 +0000 (+0100) Subject: Add form_theme template X-Git-Tag: 0.2~24 X-Git-Url: https://git.rapsys.eu/blogbundle/commitdiff_plain/1c3893d68e8cdbe1503dcca873f1ede32fa6cdbb?hp=8121e8a456951e715d368c7ae2a74e658e8bfd58 Add form_theme template --- 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 -%}