From 6bb323b181434681a902226965f55617d95701d3 Mon Sep 17 00:00:00 2001 From: Kara Engelhardt Date: Tue, 12 Nov 2024 15:48:22 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Allow=20new=20mail=20upload=20for?= =?UTF-8?q?=20all=20users?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- froide/foirequest/signals.py | 6 ++-- .../templates/foirequest/body/body.html | 31 +++---------------- 2 files changed, 8 insertions(+), 29 deletions(-) diff --git a/froide/foirequest/signals.py b/froide/foirequest/signals.py index 6647e0dc9..ac291faf4 100644 --- a/froide/foirequest/signals.py +++ b/froide/foirequest/signals.py @@ -77,7 +77,7 @@ def trigger_index_update(klass, instance_pk): def send_notification_became_overdue(sender, **kwargs): req_url = sender.user.get_autologin_url(sender.get_absolute_short_url()) upload_url = sender.user.get_autologin_url( - short_request_url("foirequest-upload_postal_message", sender) + short_request_url("foirequest-upload_postal_message_create", sender) ) send_request_user_email( became_overdue_email, @@ -99,7 +99,7 @@ def send_notification_became_overdue(sender, **kwargs): def send_notification_became_asleep(sender, **kwargs): req_url = sender.user.get_autologin_url(sender.get_absolute_short_url()) upload_url = sender.user.get_autologin_url( - short_request_url("foirequest-upload_postal_message", sender) + short_request_url("foirequest-upload_postal_message_create", sender) ) send_request_user_email( @@ -488,7 +488,7 @@ def send_foimessage_sent_confirmation(message: FoiMessage = None, **kwargs): action_url = message.get_absolute_domain_short_url() upload_url = request.user.get_autologin_url( - short_request_url("foirequest-upload_postal_message", request) + short_request_url("foirequest-upload_postal_message_create", request) ) context = { diff --git a/froide/foirequest/templates/foirequest/body/body.html b/froide/foirequest/templates/foirequest/body/body.html index 8cbb9c4df..253ecc82d 100644 --- a/froide/foirequest/templates/foirequest/body/body.html +++ b/froide/foirequest/templates/foirequest/body/body.html @@ -22,19 +22,11 @@ {% trans "Send message" %} - {% if request.user.is_staff %} - - - {% trans "Upload Mail" %} - - {% else %} - - - {% trans "Upload Mail" %} - - {% endif %} + + + {% trans "Upload Mail" %} + {% endif %} {% with hide_label=object|can_write_foirequest:request %} @@ -68,19 +60,6 @@ {% trans "Upload Mail" %} - {% comment %} -
- -
- {% endcomment %} {% endif %}