feat: implement screendesign
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{# Validation error alert box #}
|
||||
{# Parameters:
|
||||
- form: The form to check for validation errors
|
||||
- message: Optional custom error message
|
||||
- showLabels: Whether to show the list of invalid field labels (default: true)
|
||||
#}
|
||||
{% macro validation_alert(form, message, showLabels = true) %}
|
||||
{% if not form.vars.valid %}
|
||||
{% set errorLabels = showLabels ? collect_invalid_field_labels(form) : [] %}
|
||||
{% include '_partials/_alert.html.twig' with {
|
||||
level: 'error',
|
||||
title: message|default('Du hast nicht alle Pflichtfelder ausgefüllt oder einzelne Angaben sind ungültig:'),
|
||||
messages: [errorLabels | join(', ')]
|
||||
} %}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user