feat: show placeholders for individual date parts in date of birth field
This commit is contained in:
@@ -194,6 +194,27 @@
|
||||
</div>
|
||||
{%- endblock multiselect_widget -%}
|
||||
|
||||
{%- block birthday_widget -%}
|
||||
{%- set placeholders = {
|
||||
'day': 'Tag',
|
||||
'month': 'Monat',
|
||||
'year': 'Jahr'
|
||||
} -%}
|
||||
{%- set field_order = ['day', 'month', 'year'] -%}
|
||||
<div {{ block('widget_container_attributes') }}>
|
||||
{%- for field_name in field_order -%}
|
||||
{%- set child = form[field_name] -%}
|
||||
{%- set child_attr = child.vars.attr|default({}) -%}
|
||||
{%- set child_attr = child_attr|merge({
|
||||
'placeholder': placeholders[field_name],
|
||||
'class': (child_attr.class|default('') ~ ' form-field')|trim
|
||||
}) -%}
|
||||
|
||||
{{- form_widget(child, {'attr': child_attr}) -}}
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
{%- endblock birthday_widget -%}
|
||||
|
||||
{% block insurance_choice_widget %}
|
||||
{%- if expanded -%}
|
||||
{%- for child in form %}
|
||||
|
||||
Reference in New Issue
Block a user