Skip to content

Commit

Permalink
✨ [#1797] Move document upload success msg to above form
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenbal committed Nov 9, 2023
1 parent dbaac2d commit 08da81a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/open_inwoner/cms/cases/views/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
<div class="notifications">
{% 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 %}
</div>
2 changes: 2 additions & 0 deletions src/open_inwoner/templates/pages/cases/status_inner.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ <h2 class="h2" id="documents">{% trans 'Documenten' %}</h2>
{% if case.internal_upload_enabled %}
<h2 class="h2" id=>{% trans "Document uploaden" %}</h2>

{% notifications messages show_local_messages=True %}

{% if case.case_type_document_upload_description %}
<div class="card card--compact card--info">
<div class="card__body document-upload-description">
Expand Down

0 comments on commit 08da81a

Please sign in to comment.