Merge branch '474-improve-event-accessibility' into 'master'

Improve accessibility of event form

Closes #474

See merge request Chill-Projet/chill-bundles!932
This commit is contained in:
2025-12-05 11:58:25 +00:00
4 changed files with 40 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
kind: UX
body: Improve accessibility of event form
time: 2025-11-26T13:39:10.462348982+01:00
custom:
Issue: "474"
SchemaChange: No schema change

View File

@@ -15,7 +15,6 @@
{{ form_row(edit_form.circle) }} {{ form_row(edit_form.circle) }}
{{ form_row(edit_form.name) }} {{ form_row(edit_form.name) }}
{{ form_row(edit_form.date) }} {{ form_row(edit_form.date) }}
{{ form_row(edit_form.type, { label: "Event type" }) }} {{ form_row(edit_form.type, { label: "Event type" }) }}
{{ form_row(edit_form.themes) }} {{ form_row(edit_form.themes) }}
{{ form_row(edit_form.moderator) }} {{ form_row(edit_form.moderator) }}

View File

@@ -37,4 +37,9 @@ class ChillDateTimeType extends AbstractType
{ {
return DateTimeType::class; return DateTimeType::class;
} }
public function getBlockPrefix(): string
{
return 'chill_datetime';
}
} }

View File

@@ -311,3 +311,32 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% block chill_datetime_label %}
<label for="{{ form.date.vars.id }}" class="col-form-label col-sm-4 required">
{{ "Date"|trans }}
</label>
{% endblock %}
{% block chill_datetime_widget %}
<div class="col-sm-8 d-flex align-items-start gap-2">
{#date#}
{{ form_widget(form.date, {
attr: { class: 'form-control', style: 'flex: 1 1 auto;' }
}) }}
{#time#}
{{ form_widget(form.time, {
attr: {
class: 'form-select',
style: 'flex: 0 0 200px; max-width: 200px; white-space: nowrap; padding:0;'
}
}) }}
</div>
{% endblock %}
{% block chill_datetime_row %}
<div class="mb-3 row">
{{ block('chill_datetime_label') }}
{{ block('chill_datetime_widget') }}
</div>
{% endblock %}