From c2636354a58392d88d6eba2e9a622be93445df1c Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Wed, 13 Dec 2023 01:56:11 +0000 Subject: [PATCH] remote_billing_login: Show different title for deactivate login. --- corporate/tests/test_remote_billing.py | 2 +- corporate/views/remote_billing_page.py | 1 + .../remote_billing_finalize_login_confirmation.html | 12 +++++++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/corporate/tests/test_remote_billing.py b/corporate/tests/test_remote_billing.py index a80c126323..bf74629990 100644 --- a/corporate/tests/test_remote_billing.py +++ b/corporate/tests/test_remote_billing.py @@ -771,7 +771,7 @@ class TestGenerateDeactivationLink(BouncerTestCase): result = self.client_get(confirmation_url, subdomain="selfhosting") self.assert_in_success_response( - ["Log in to Zulip plan management", server.contact_email], result + ["Log in to deactivate registration for", server.contact_email], result ) payload = {"full_name": "test", "tos_consent": "true"} result = self.client_post(confirmation_url, payload, subdomain="selfhosting") diff --git a/corporate/views/remote_billing_page.py b/corporate/views/remote_billing_page.py index 48e182a4c5..e42ccb60e2 100644 --- a/corporate/views/remote_billing_page.py +++ b/corporate/views/remote_billing_page.py @@ -597,6 +597,7 @@ def remote_billing_legacy_server_from_login_confirmation_link( args=(confirmation_key,), ), "legacy_server_confirmation_flow": True, + "next_page": prereg_object.next_page, } return render( request, diff --git a/templates/corporate/remote_billing_finalize_login_confirmation.html b/templates/corporate/remote_billing_finalize_login_confirmation.html index 4eba8c9b59..26bb9e7dfb 100644 --- a/templates/corporate/remote_billing_finalize_login_confirmation.html +++ b/templates/corporate/remote_billing_finalize_login_confirmation.html @@ -2,14 +2,24 @@ {% set entrypoint = "upgrade" %} {% block title %} -Log in to Zulip plan management for {{ host }} | Zulip + + {% if next_page and next_page == "deactivate" %} + Log in to deactivate registration for {{ host }} | Zulip + {% else %} + Log in to Zulip plan management for {{ host }} | Zulip + {% endif %} + {% endblock %} {% block portico_content %}
+ {% if next_page and next_page == "deactivate" %} +

Log in to deactivate registration for
{{ host }}

+ {% else %}

Log in to Zulip plan management for
{{ host }}

+ {% endif %}