Closed
Description
Symfony version(s) affected: every ?
Description
- I'm creating form button, that has only icon ... It's not possible to define title for button, that has no text
How to reproduce
$builder->add('reset', ResetType::class, [
'label' => false,
'attr' => [
'title' => 'word.reset_filter'
]
]);
My Solution
override block button_widget
{% block button_widget -%}
{% set original_translation_domain = translation_domain %}
....
{%- endblock button_widget %}
override block button_attributes
{%- block button_attributes -%}
{% set translation_domain = original_translation_domain %}
id="{{ id }}" name="{{ full_name }}"{% if disabled %} disabled="disabled"{% endif -%}
{{ block('attributes') }}
{%- endblock button_attributes -%}