diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig index 13603812c09a5..3c6fbacebd9b2 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig @@ -317,44 +317,17 @@ id="{{ id }}" name="{{ full_name }}" {%- if disabled %} disabled="disabled"{% endif -%} {%- if required %} required="required"{% endif -%} - {%- for attrname, attrvalue in attr -%} - {{- " " -}} - {%- if attrname in ['placeholder', 'title'] -%} - {{- attrname }}="{{ attrvalue|trans({}, translation_domain) }}" - {%- elseif attrvalue is sameas(true) -%} - {{- attrname }}="{{ attrname }}" - {%- elseif attrvalue is not sameas(false) -%} - {{- attrname }}="{{ attrvalue }}" - {%- endif -%} - {%- endfor -%} + {{ block('attributes') }} {%- endblock widget_attributes -%} {%- block widget_container_attributes -%} {%- if id is not empty %}id="{{ id }}"{% endif -%} - {%- for attrname, attrvalue in attr -%} - {{- " " -}} - {%- if attrname in ['placeholder', 'title'] -%} - {{- attrname }}="{{ attrvalue|trans({}, translation_domain) }}" - {%- elseif attrvalue is sameas(true) -%} - {{- attrname }}="{{ attrname }}" - {%- elseif attrvalue is not sameas(false) -%} - {{- attrname }}="{{ attrvalue }}" - {%- endif -%} - {%- endfor -%} + {{ block('attributes') }} {%- endblock widget_container_attributes -%} {%- block button_attributes -%} id="{{ id }}" name="{{ full_name }}"{% if disabled %} disabled="disabled"{% endif -%} - {%- for attrname, attrvalue in attr -%} - {{- " " -}} - {%- if attrname in ['placeholder', 'title'] -%} - {{- attrname }}="{{ attrvalue|trans({}, translation_domain) }}" - {%- elseif attrvalue is sameas(true) -%} - {{- attrname }}="{{ attrname }}" - {%- elseif attrvalue is not sameas(false) -%} - {{- attrname }}="{{ attrvalue }}" - {%- endif -%} - {%- endfor -%} + {{ block('attributes') }} {%- endblock button_attributes -%} {% block attributes -%}