8000 Add row_attr options to FormType · symfony/symfony@2d59e26 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2d59e26

Browse files
Add row_attr options to FormType
1 parent 5754846 commit 2d59e26

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@
325325
{%- if help is not empty -%}
326326
{%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%}
327327
{%- endif -%}
328-
<div>
328+
<div {% with {attr: row_attr} %}{{ block('attributes') }}{% endwith %}>
329329
{{- form_label(form) -}}
330330
{{- form_errors(form) -}}
331331
{{- form_widget(form, widget_attr) -}}
@@ -334,7 +334,7 @@
334334
{%- endblock form_row -%}
335335

336336
{%- block button_row -%}
337-
<div>
337+
<div {% with {attr: row_attr} %}{{ block('attributes< 921E /span>') }}{% endwith %}>
338338
{{- form_widget(form) -}}
339339
</div>
340340
{%- endblock button_row -%}

src/Symfony/Component/Form/Extension/Core/Type/FormType.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ public function configureOptions(OptionsResolver $resolver)
183183
// section 4.2., empty URIs are considered same-document references
184184
'action' => '',
185185
'attr' => [],
186+
'row_attr' => [],
186187
'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.',
187188
'upload_max_size_message' => $uploadMaxSizeMessage, // internal
188189
'allow_file_upload' => false,

0 commit comments

Comments
 (0)
0