From 08da81a7b3fc175a9e2de0fe3deb44c5f0c54118 Mon Sep 17 00:00:00 2001 From: Steven Bal Date: Thu, 9 Nov 2023 10:23:02 +0100 Subject: [PATCH] :sparkles: [#1797] Move document upload success msg to above form --- src/open_inwoner/cms/cases/views/status.py | 2 +- .../templates/components/Notification/Notifications.html | 6 +++++- src/open_inwoner/templates/pages/cases/status_inner.html | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/open_inwoner/cms/cases/views/status.py b/src/open_inwoner/cms/cases/views/status.py index f723735514..cd34f3d1c0 100644 --- a/src/open_inwoner/cms/cases/views/status.py +++ b/src/open_inwoner/cms/cases/views/status.py @@ -406,7 +406,7 @@ def handle_document_upload(self, request, form): self.request, messages.SUCCESS, success_message, - extra_tags="as_markdown", + extra_tags="as_markdown local_message", ) return HttpResponseClientRedirect( diff --git a/src/open_inwoner/components/templates/components/Notification/Notifications.html b/src/open_inwoner/components/templates/components/Notification/Notifications.html index 64f4e95394..3f0383ca78 100644 --- a/src/open_inwoner/components/templates/components/Notification/Notifications.html +++ b/src/open_inwoner/components/templates/components/Notification/Notifications.html @@ -3,7 +3,11 @@
{% for message in messages %} {% with is_markdown=message.extra_tags|is_substring:"as_markdown" %} - {% notification icon=message.icon type=message.level_tag message=message.message as_markdown=is_markdown closable=True compact=compact %} + {% with local_message=message.extra_tags|is_substring:"local_message" %} + {% if show_local_messages and local_message or not show_local_messages and not local_message %} + {% notification icon=message.icon type=message.level_tag message=message.message as_markdown=is_markdown closable=True compact=compact %} + {% endif %} + {% endwith %} {% endwith %} {% endfor %}
diff --git a/src/open_inwoner/templates/pages/cases/status_inner.html b/src/open_inwoner/templates/pages/cases/status_inner.html index f84e95f994..46cbf66775 100644 --- a/src/open_inwoner/templates/pages/cases/status_inner.html +++ b/src/open_inwoner/templates/pages/cases/status_inner.html @@ -44,6 +44,8 @@

{% trans 'Documenten' %}

{% if case.internal_upload_enabled %}

{% trans "Document uploaden" %}

+ {% notifications messages show_local_messages=True %} + {% if case.case_type_document_upload_description %}