From 247905e2579acd5c07b28ab3297388a53656f225 Mon Sep 17 00:00:00 2001 From: George Katsikas <giorgakis.katsikas@gmail.com> Date: Wed, 1 Nov 2023 17:05:15 +0100 Subject: [PATCH] add confirmation button to anonymize report action --- .../submissions/_report_public_without_comments.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scipost_django/submissions/templates/submissions/_report_public_without_comments.html b/scipost_django/submissions/templates/submissions/_report_public_without_comments.html index 69a9d1705..a45984a76 100644 --- a/scipost_django/submissions/templates/submissions/_report_public_without_comments.html +++ b/scipost_django/submissions/templates/submissions/_report_public_without_comments.html @@ -54,7 +54,11 @@ {% endif %} {% else %} {% if user|is_in_group:'Editorial Administrators' and not user|is_possible_author_of_submission:submission %} - <button class="btn btn-sm btn-danger text-white my-2" hx-get="{% url "submissions:_hx_anonymize_report" report_id=report.id %}" hx-target="#report_{{report.report_nr}}" hx-swap="outerHTML"> + <button class="btn btn-sm btn-danger text-white my-2" + hx-get="{% url "submissions:_hx_anonymize_report" report_id=report.id %}" + hx-target="#report_{{report.report_nr}}" + hx-swap="outerHTML" + hx-confirm="Are you sure you want to anonymize this report?"> Anonymize this report </button> {% endif %} -- GitLab