feat: ensure teamer accepts terms when confirming driver's license

This commit is contained in:
Björn Fromme
2026-03-15 12:42:28 +01:00
parent 3b6ebdaddc
commit 3d71dcfc14
3 changed files with 52 additions and 14 deletions
@@ -15,12 +15,6 @@
Führerscheins hoch.
</p>
{% if not form.vars.valid %}
<div class="border border-red-500 rounded-md p-4 text-red-500 mb-6">
{% include '_partials/_form_errors.html.twig' with { 'form': form } %}
</div>
{% endif %}
{% if teamer.driverLicenseStatus == constant('App\\Entity\\Teamer::DRIVER_LICENSE_STATUS_DENIED') %}
{% embed '_partials/_alert.html.twig' with { 'type': 'warning' } %}
{% block message %}
@@ -33,6 +27,14 @@
{% endembed %}
{% endif %}
{% if not form.vars.valid %}
{% embed '_partials/_alert.html.twig' with { 'type': 'warning' } %}
{% block message %}
{% include '_partials/_form_errors.html.twig' with { 'form': form } %}
{% endblock %}
{% endembed %}
{% endif %}
<div class="flex flex-col space-y-4 pb-6">
{{ form_row(form.hasDriverLicense) }}
@@ -55,6 +57,8 @@
'accepted_files': 'image/jpg,image/jpeg,image/png,application/pdf',
} %}
</div>
{{ form_row(form.confirmTermsOfUse) }}
</div>
<button type="submit" class="btn" {{ stimulus_target('form-upload-guard', 'submit') }}>