diff --git a/meinberlin/apps/budgeting/templates/meinberlin_budgeting/includes/proposal_form.html b/meinberlin/apps/budgeting/templates/meinberlin_budgeting/includes/proposal_form.html index 99c6ff69c7..738edb7f9d 100644 --- a/meinberlin/apps/budgeting/templates/meinberlin_budgeting/includes/proposal_form.html +++ b/meinberlin/apps/budgeting/templates/meinberlin_budgeting/includes/proposal_form.html @@ -40,12 +40,16 @@

{% blocktranslate %}Contact Information{% endblocktranslate %}

{% blocktranslate with privacy_policy="/datenschutz" %}I hereby expressly consent to the storage of the contact information I have entered. The contact information may be used by the responsible administration exclusively for contacting me in the present project. I can revoke this consent at any time. I have read and accept the privacy policy.{% endblocktranslate %} {% if form.contact_storage_consent.errors %} + {% if form.contact_storage_consent.errors|length > 1 %} + {% else %} + {% include 'meinberlin_contrib/components/alert.html' with alert_message=form.contact_storage_consent.errors.0|escape alert_type='danger' %} {% endif %} + {% endif %} {% include 'meinberlin_contrib/includes/form_submit_actions.html' with button_text='Send' %} diff --git a/meinberlin/apps/budgeting/templates/meinberlin_budgeting/proposal_update_form.html b/meinberlin/apps/budgeting/templates/meinberlin_budgeting/proposal_update_form.html index ce5f559660..b9092c6648 100644 --- a/meinberlin/apps/budgeting/templates/meinberlin_budgeting/proposal_update_form.html +++ b/meinberlin/apps/budgeting/templates/meinberlin_budgeting/proposal_update_form.html @@ -25,9 +25,7 @@

{% translate 'Edit proposal' %}

{% if form.errors %} -
- {% translate 'An error occurred while evaluating your data. Please check the data you entered again.' %} -
+ {% include 'meinberlin_contrib/components/alert.html' with alert_message='Error during validation. Please check your entries.' alert_type='danger' %} {% endif %} {% include "meinberlin_budgeting/includes/proposal_form.html" with proposal=proposal cancel=object.get_absolute_url %} diff --git a/meinberlin/apps/contrib/templates/meinberlin_contrib/components/moderator_form.html b/meinberlin/apps/contrib/templates/meinberlin_contrib/components/moderator_form.html index 93756ff0ab..8ddb8f17e2 100644 --- a/meinberlin/apps/contrib/templates/meinberlin_contrib/components/moderator_form.html +++ b/meinberlin/apps/contrib/templates/meinberlin_contrib/components/moderator_form.html @@ -1,6 +1,6 @@ {% load i18n item_tags contrib_tags moderatorremark_tags %} -
+ {% csrf_token %} {% for form in forms.values %} {{ form.media }} @@ -8,7 +8,9 @@ {% include 'meinberlin_contrib/includes/form_field_select.html' with field=forms.moderateable.moderator_status %} {% include 'meinberlin_contrib/includes/form_field.html' with field=forms.feedback_text.feedback_text %} - {% include 'meinberlin_contrib/includes/form_checkbox_field.html' with field=forms.moderateable.is_archived %} + {% if forms.moderateable.is_archived %} + {% include 'meinberlin_contrib/includes/form_checkbox_field.html' with field=forms.moderateable.is_archived %} + {% endif %} {% if forms.moderateable.show_tasks %} {% include 'meinberlin_contrib/includes/form_field.html' with field=forms.moderateable.completed_tasks add_class='u-top-divider' %} {% include 'meinberlin_contrib/includes/form_field.html' with field=forms.remark.remark %} diff --git a/meinberlin/apps/contrib/templates/meinberlin_contrib/includes/form_checkbox_field.html b/meinberlin/apps/contrib/templates/meinberlin_contrib/includes/form_checkbox_field.html index 26936ea76e..63c344996c 100644 --- a/meinberlin/apps/contrib/templates/meinberlin_contrib/includes/form_checkbox_field.html +++ b/meinberlin/apps/contrib/templates/meinberlin_contrib/includes/form_checkbox_field.html @@ -12,11 +12,15 @@ {% endif %} {% if field.errors %} - - {% endif %} + {% if field.errors|length > 1 %} + + {% else %} + {% include 'meinberlin_contrib/components/alert.html' with alert_message=field.errors.0|escape alert_type='danger' %} + {% endif %} + {% endif %} diff --git a/meinberlin/apps/maptopicprio/templates/meinberlin_maptopicprio/maptopic_create_form.html b/meinberlin/apps/maptopicprio/templates/meinberlin_maptopicprio/maptopic_create_form.html index fcd0c5eba6..698227cdc4 100644 --- a/meinberlin/apps/maptopicprio/templates/meinberlin_maptopicprio/maptopic_create_form.html +++ b/meinberlin/apps/maptopicprio/templates/meinberlin_maptopicprio/maptopic_create_form.html @@ -8,9 +8,7 @@

{% translate 'Add a new place' %}

{% if form.errors %} -
- {% translate 'An error occurred while evaluating your data. Please check the data you entered again.' %} -
+ {% include 'meinberlin_contrib/components/alert.html' with alert_message='An error occurred while evaluating your data. Please check the data you entered again.' alert_type='danger' %} {% endif %} {% url 'a4dashboard:maptopic-list' module_slug=module.slug as cancel %} diff --git a/meinberlin/apps/maptopicprio/templates/meinberlin_maptopicprio/maptopic_update_form.html b/meinberlin/apps/maptopicprio/templates/meinberlin_maptopicprio/maptopic_update_form.html index a6f6204e5d..cd17d65222 100644 --- a/meinberlin/apps/maptopicprio/templates/meinberlin_maptopicprio/maptopic_update_form.html +++ b/meinberlin/apps/maptopicprio/templates/meinberlin_maptopicprio/maptopic_update_form.html @@ -8,9 +8,7 @@

{% translate 'Edit place' %}

{% if form.errors %} -
- {% translate 'An error occurred while evaluating your data. Please check the data you entered again.' %} -
+ {% include 'meinberlin_contrib/components/alert.html' with alert_message='An error occurred while evaluating your data. Please check the data you entered again.' alert_type='danger' %} {% endif %} {% url 'a4dashboard:maptopic-list' module_slug=module.slug as cancel %} diff --git a/meinberlin/apps/offlineevents/templates/meinberlin_offlineevents/offlineevent_create_form.html b/meinberlin/apps/offlineevents/templates/meinberlin_offlineevents/offlineevent_create_form.html index 168a401dec..ac0cdbc67d 100644 --- a/meinberlin/apps/offlineevents/templates/meinberlin_offlineevents/offlineevent_create_form.html +++ b/meinberlin/apps/offlineevents/templates/meinberlin_offlineevents/offlineevent_create_form.html @@ -7,9 +7,7 @@

{% translate 'Add a new offline event'%}

{% if form.errors %} -
- {% translate 'An error occurred while evaluating your data. Please check the data you entered again.' %} -
+ {% include 'meinberlin_contrib/components/alert.html' with alert_message='An error occurred while evaluating your data. Please check the data you entered again.' alert_type='danger' %} {% endif %} {% url 'a4dashboard:offlineevent-list' project_slug=project.slug as cancel %} diff --git a/meinberlin/apps/offlineevents/templates/meinberlin_offlineevents/offlineevent_update_form.html b/meinberlin/apps/offlineevents/templates/meinberlin_offlineevents/offlineevent_update_form.html index 7992ec6fcc..a0f8bbdd1c 100644 --- a/meinberlin/apps/offlineevents/templates/meinberlin_offlineevents/offlineevent_update_form.html +++ b/meinberlin/apps/offlineevents/templates/meinberlin_offlineevents/offlineevent_update_form.html @@ -8,9 +8,7 @@

{% translate 'Edit offline event' %}

{% if form.errors %} -
- {% translate 'An error occurred while evaluating your data. Please check the data you entered again.' %} -
+ {% include 'meinberlin_contrib/components/alert.html' with alert_message='An error occurred while evaluating your data. Please check the data you entered again.' alert_type='danger' %} {% endif %} {% url 'a4dashboard:offlineevent-list' project_slug=project.slug as cancel %} diff --git a/meinberlin/apps/plans/templates/meinberlin_plans/includes/plan_form.html b/meinberlin/apps/plans/templates/meinberlin_plans/includes/plan_form.html index 38d1764992..37f77e39cc 100644 --- a/meinberlin/apps/plans/templates/meinberlin_plans/includes/plan_form.html +++ b/meinberlin/apps/plans/templates/meinberlin_plans/includes/plan_form.html @@ -4,9 +4,7 @@ {{ form.media }} {% if form.errors %} -
- {% translate 'An error occurred while evaluating your data. Please check the data you entered again.' %} -
+ {% include 'meinberlin_contrib/components/alert.html' with alert_message='An error occurred while evaluating your data. Please check the data you entered again.' alert_type='danger' %} {% endif %}

{% translate 'Description of the plan' %}

diff --git a/meinberlin/apps/projects/templates/meinberlin_projects/includes/users_from_email_form.html b/meinberlin/apps/projects/templates/meinberlin_projects/includes/users_from_email_form.html index fdc54d7e43..024fc27964 100644 --- a/meinberlin/apps/projects/templates/meinberlin_projects/includes/users_from_email_form.html +++ b/meinberlin/apps/projects/templates/meinberlin_projects/includes/users_from_email_form.html @@ -3,9 +3,7 @@ {% csrf_token %} {% if form.errors %} -
- {% translate 'An error occurred while evaluating your data. Please check the data you entered again.' %} -
+ {% include 'meinberlin_contrib/components/alert.html' with alert_message='An error occurred while evaluating your data. Please check the data you entered again.' alert_type='danger' %} {% endif %}
diff --git a/meinberlin/apps/votes/templates/meinberlin_votes/token_generation_dashboard.html b/meinberlin/apps/votes/templates/meinberlin_votes/token_generation_dashboard.html index cf6cc45452..b1447e8fb2 100644 --- a/meinberlin/apps/votes/templates/meinberlin_votes/token_generation_dashboard.html +++ b/meinberlin/apps/votes/templates/meinberlin_votes/token_generation_dashboard.html @@ -10,9 +10,7 @@

{% translate 'Generate voting codes' %}

{% csrf_token %} {% if form.errors %} -
- {% translate 'An error occurred while evaluating your data. Please check the data you entered again.' %} -
+ {% include 'meinberlin_contrib/components/alert.html' with alert_message='An error occurred while evaluating your data. Please check the data you entered again.' alert_type='danger' %} {% endif %} {% if form.non_field_errors %} diff --git a/meinberlin/templates/a4dashboard/base_form_module.html b/meinberlin/templates/a4dashboard/base_form_module.html index 7049b655d7..a9e554ccc5 100644 --- a/meinberlin/templates/a4dashboard/base_form_module.html +++ b/meinberlin/templates/a4dashboard/base_form_module.html @@ -7,9 +7,7 @@

{{ view.title }}

{% if form.errors %} -
- {% translate 'An error occurred while evaluating your data. Please check the data you entered again.' %} -
+ {% include 'meinberlin_contrib/components/alert.html' with alert_message='An error occurred while evaluating your data. Please check the data you entered again.' alert_type='danger' %} {% endif %} {% if form.non_field_errors %} diff --git a/meinberlin/templates/a4dashboard/base_form_project.html b/meinberlin/templates/a4dashboard/base_form_project.html index c526926365..1c9f3c3e03 100644 --- a/meinberlin/templates/a4dashboard/base_form_project.html +++ b/meinberlin/templates/a4dashboard/base_form_project.html @@ -7,9 +7,7 @@

{{ view.title }}

{% if form.errors %} -
- {% translate 'An error occurred while evaluating your data. Please check the data you entered again.' %} -
+ {% include 'meinberlin_contrib/components/alert.html' with alert_message='An error occurred while evaluating your data. Please check the data you entered again.' alert_type='danger' %} {% endif %} {% if form.non_field_errors %} diff --git a/meinberlin/templates/a4forms/includes/form_checkbox_field.html b/meinberlin/templates/a4forms/includes/form_checkbox_field.html index 6d1bd7461a..9cc9b42e24 100644 --- a/meinberlin/templates/a4forms/includes/form_checkbox_field.html +++ b/meinberlin/templates/a4forms/includes/form_checkbox_field.html @@ -19,4 +19,16 @@ {% endfor %} {% endif %} + + {% if field.errors %} + {% if field.errors|length > 1 %} + + {% else %} + {% include 'meinberlin_contrib/components/alert.html' with alert_message=field.errors.0|escape alert_type='danger' %} + {% endif %} + {% endif %}