Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

confirmation: Delete rendundant confirmation_link_expired_error page.

Mateusz Mandera39ce424fd5ed
diff --git a/templates/zerver/confirmation_link_expired_error.html b/templates/zerver/confirmation_link_expired_error.html
deleted file mode 100644
index a423755f1f8..00000000000
--- a/templates/zerver/confirmation_link_expired_error.html
+++ /dev/null
@@ -1,14 +0,0 @@
-{% extends "zerver/portico_signup.html" %}
-
-{% block portico_content %}
-<div class="app portico-page">
- <div class="app-main portico-page-container center-block flex full-page account-creation new-style">
- <div class="inline-block">
- <div class="app-main white-box">
- <h1>{{ _("The registration link has expired or is not valid.") }}</h1>
- <a href="{{ login_url }}">{{ _("Log in") }}</a>.
- </div>
- </div>
- </div>
-</div>
-{% endblock %}
diff --git a/zerver/tests/test_signup.py b/zerver/tests/test_signup.py
index d0194209489..a977f718f73 100644
--- a/zerver/tests/test_signup.py
+++ b/zerver/tests/test_signup.py
@@ -2115,7 +2115,7 @@ so we didn't send them an invitation. We did send invitations to everyone else!"
"""Since the key is a param input by the user to the registration endpoint,
if it inserts an invalid value, the confirmation object won't be found. This
tests if, in that scenario, we handle the exception by redirecting the user to
- the confirmation_link_expired_error page.
+ the link_expired page.
"""
email = self.nonreg_email("alice")
password = "password"
@@ -3980,7 +3980,9 @@ class UserSignUpTest(InviteUserBase):
)
# Error page should be displayed
self.assertEqual(result.status_code, 404)
- self.assert_in_response("The registration link has expired or is not valid.", result)
+ self.assert_in_response(
+ "Whoops. The confirmation link has expired or been deactivated.", result
+ )
def test_signup_with_multiple_default_stream_groups(self) -> None:
# Check if user is subscribed to the streams of default
diff --git a/zerver/views/registration.py b/zerver/views/registration.py
index ea5edfd6c42..449d8485666 100644
--- a/zerver/views/registration.py
+++ b/zerver/views/registration.py
@@ -132,7 +132,7 @@ def check_prereg_key(
return render_confirmation_key_error(request, exception)
if prereg_user.status == confirmation_settings.STATUS_REVOKED:
- return render(request, "zerver/confirmation_link_expired_error.html", status=404)
+ return render(request, "confirmation/link_expired.html", status=404)
return prereg_user