templates: Improve email confirmation page.

This commit updates the text on email confirmation page to
make it more clear what's going on and why the user needs
to check their email.

Fixes #25900.
This commit is contained in:
Sahil Batra 2023-06-08 19:36:06 +05:30 committed by Tim Abbott
parent 987bbb641f
commit 95f8ab1626
5 changed files with 42 additions and 38 deletions

View File

@ -10,20 +10,20 @@
page can be easily identified in it's respective JavaScript file -->
<div data-page-id="accounts-send-confirm"></div>
<div class="app portico-page">
<div class="app-main portico-page-container center-block flex full-page account-creation new-style">
<div class="app-main portico-page-container center-block flex full-page account-creation account-email-confirm-container new-style">
<div class="inline-block">
<div class="get-started">
<h1>{{ _("Thanks for signing up!") }}</h1>
<h1>{{ _("Confirm your email address") }}</h1>
</div>
<div class="white-box">
<p>{% trans %}Check your email (<span class="user_email semi-bold">{{ email }}</span>) so we can get started.{% endtrans %}</p>
<p>{% trans %}To complete your registration, check your email account (<span class="user_email semi-bold">{{ email }}</span>) for a confirmation email from Zulip.{% endtrans %}</p>
{% include 'zerver/dev_env_email_access_details.html' %}
<p>{% trans %}Still no email? We can <a href="#" id="resend_email_link">resend it</a>.{% endtrans %}
<i class="grey">({{ _("Just in case, take a look at your Spam folder.") }})</i></p>
<p>{% trans %}If you don't see a confirmation email in your Inbox or Spam folder, we can <a href="#" id="resend_email_link">resend it</a>.{% endtrans %}
</p>
{% if realm_creation %}
<form class="resend_confirm" action="/new/" method="post" style="position: absolute;">
{{ csrf_input }}

View File

@ -170,6 +170,10 @@ html {
font-size: 19px;
}
}
&.account-email-confirm-container .white-box {
max-width: 545px;
}
}
.login-page-container {

View File

@ -2197,7 +2197,7 @@ class MultiuseInviteTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
confirmation_url = self.get_confirmation_url_from_outbox(email)
result = self.client_get(confirmation_url)

View File

@ -342,7 +342,7 @@ class TestGenerateRealmCreationLink(ZulipTestCase):
result["Location"],
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Original link is now dead
result = self.client_get(generated_link)

View File

@ -1267,7 +1267,7 @@ class RealmCreationTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
prereg_realm = PreregistrationRealm.objects.get(email=email)
self.assertEqual(prereg_realm.name, "Zulip Test")
self.assertEqual(prereg_realm.org_type, Realm.ORG_TYPES["business"]["id"])
@ -1404,7 +1404,7 @@ class RealmCreationTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
confirmation_url = self.get_confirmation_url_from_outbox(email)
@ -1450,7 +1450,7 @@ class RealmCreationTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
confirmation_url = self.get_confirmation_url_from_outbox(email)
@ -1499,7 +1499,7 @@ class RealmCreationTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
confirmation_url = self.get_confirmation_url_from_outbox(email)
@ -1559,7 +1559,7 @@ class RealmCreationTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
confirmation_url = self.get_confirmation_url_from_outbox(email)
@ -1604,7 +1604,7 @@ class RealmCreationTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
confirmation_url = self.get_confirmation_url_from_outbox(email)
@ -1653,7 +1653,7 @@ class RealmCreationTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
confirmation_url = self.get_confirmation_url_from_outbox(email)
@ -1703,7 +1703,7 @@ class RealmCreationTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
confirmation_url = self.get_confirmation_url_from_outbox(email)
result = self.client_get(confirmation_url)
@ -1759,7 +1759,7 @@ class RealmCreationTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
first_confirmation_url = self.get_confirmation_url_from_outbox(email)
self.assertEqual(PreregistrationRealm.objects.filter(email=email, status=0).count(), 1)
@ -1773,7 +1773,7 @@ class RealmCreationTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
second_confirmation_url = self.get_confirmation_url_from_outbox(email)
self.assertNotEqual(first_confirmation_url, second_confirmation_url)
@ -2041,7 +2041,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"], **client_kwargs)
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
confirmation_url = self.get_confirmation_url_from_outbox(email)
@ -2124,7 +2124,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
confirmation_url = self.get_confirmation_url_from_outbox(email)
@ -2159,7 +2159,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
confirmation_url = self.get_confirmation_url_from_outbox(email)
@ -2197,7 +2197,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
confirmation_url = self.get_confirmation_url_from_outbox(email)
@ -2230,7 +2230,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
confirmation_url = self.get_confirmation_url_from_outbox(email)
@ -2335,7 +2335,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
from django.core.mail import outbox
@ -2357,7 +2357,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
confirmation_url = self.get_confirmation_url_from_outbox(email)
@ -2393,7 +2393,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
confirmation_url = self.get_confirmation_url_from_outbox(email)
@ -2676,7 +2676,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
confirmation_url = self.get_confirmation_url_from_outbox(email)
@ -2860,7 +2860,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
from django.core.mail import outbox
@ -2948,7 +2948,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
from django.core.mail import outbox
@ -3032,7 +3032,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
with self.settings(
POPULATE_PROFILE_VIA_LDAP=True,
@ -3109,7 +3109,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
with self.settings(
POPULATE_PROFILE_VIA_LDAP=True,
@ -3185,7 +3185,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
with self.settings(
POPULATE_PROFILE_VIA_LDAP=True,
@ -3335,7 +3335,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
with self.settings(
POPULATE_PROFILE_VIA_LDAP=True,
@ -3390,7 +3390,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# If the user's email is inside the LDAP directory and we just
# have a wrong password, then we refuse to create an account
@ -3516,7 +3516,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
with self.settings(
POPULATE_PROFILE_VIA_LDAP=True,
@ -3561,7 +3561,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
with self.settings(
POPULATE_PROFILE_VIA_LDAP=True,
LDAP_EMAIL_ATTR="mail",
@ -3722,7 +3722,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
with patch("zerver.views.registration.name_changes_disabled", return_value=True):
result = self.submit_reg_form_for_user(
@ -3755,7 +3755,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"])
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
from django.core.mail import outbox
@ -3821,7 +3821,7 @@ class UserSignUpTest(ZulipTestCase):
)
)
result = self.client_get(result["Location"], subdomain="zephyr")
self.assert_in_response("Check your email", result)
self.assert_in_response("check your email", result)
# Visit the confirmation link.
from django.core.mail import outbox