Skip to content

Commit

Permalink
templates: Improve email confirmation page.
Browse files Browse the repository at this point in the history
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 zulip#25900.
  • Loading branch information
sahil839 authored and timabbott committed Jul 2, 2023
1 parent 987bbb6 commit 95f8ab1
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 38 deletions.
10 changes: 5 additions & 5 deletions templates/zerver/accounts_send_confirm.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 4 additions & 0 deletions web/styles/portico/portico_signin.css
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ html {
font-size: 19px;
}
}

&.account-email-confirm-container .white-box {
max-width: 545px;
}
}

.login-page-container {
Expand Down
2 changes: 1 addition & 1 deletion zerver/tests/test_invite.py
Original file line number Diff line number Diff line change
Expand Up @@ -2197,7 +2197,7 @@ def check_user_able_to_register(self, email: str, invite_link: str) -> None:
)
)
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)
Expand Down
2 changes: 1 addition & 1 deletion zerver/tests/test_management_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def test_generate_link_confirm_email(self) -> None:
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)
Expand Down
62 changes: 31 additions & 31 deletions zerver/tests/test_signup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ def check_able_to_create_realm(self, email: str, password: str = "test") -> None
)
)
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"])
Expand Down Expand Up @@ -1404,7 +1404,7 @@ def test_create_realm_with_subdomain(self) -> None:
)
)
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)
Expand Down Expand Up @@ -1450,7 +1450,7 @@ def test_create_realm_with_marketing_emails_enabled(self) -> None:
)
)
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)
Expand Down Expand Up @@ -1499,7 +1499,7 @@ def test_create_realm_without_prompting_for_marketing_emails(self) -> None:
)
)
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)
Expand Down Expand Up @@ -1559,7 +1559,7 @@ def test_create_realm_with_marketing_emails_disabled(self) -> None:
)
)
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)
Expand Down Expand Up @@ -1604,7 +1604,7 @@ def test_create_regular_realm_welcome_bot_direct_message(self) -> None:
)
)
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)
Expand Down Expand Up @@ -1653,7 +1653,7 @@ def test_create_education_demo_organization_welcome_bot_direct_message(self) ->
)
)
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)
Expand Down Expand Up @@ -1703,7 +1703,7 @@ def test_create_realm_during_free_trial(self) -> None:
)
)
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)
Expand Down Expand Up @@ -1759,7 +1759,7 @@ def test_create_two_realms(self) -> None:
)
)
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)

Expand All @@ -1773,7 +1773,7 @@ def test_create_two_realms(self) -> None:
)
)
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)
Expand Down Expand Up @@ -2041,7 +2041,7 @@ def verify_signup(
)
)
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)
Expand Down Expand Up @@ -2124,7 +2124,7 @@ def test_user_default_language_and_timezone(self) -> None:
)
)
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)
Expand Down Expand Up @@ -2159,7 +2159,7 @@ def test_default_language_with_unsupported_browser_locale(self) -> None:
)
)
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)
Expand Down Expand Up @@ -2197,7 +2197,7 @@ def test_default_twenty_four_hour_time(self) -> None:
)
)
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)
Expand Down Expand Up @@ -2230,7 +2230,7 @@ def test_email_address_visibility_for_new_user(self) -> None:
)
)
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)
Expand Down Expand Up @@ -2335,7 +2335,7 @@ def test_signup_email_message_contains_org_header(self) -> None:
)
)
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

Expand All @@ -2357,7 +2357,7 @@ def test_signup_with_full_name(self) -> None:
)
)
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)
Expand Down Expand Up @@ -2393,7 +2393,7 @@ def test_signup_with_weak_password(self) -> None:
)
)
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)
Expand Down Expand Up @@ -2676,7 +2676,7 @@ def test_signup_invalid_subdomain(self) -> None:
)
)
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)
Expand Down Expand Up @@ -2860,7 +2860,7 @@ def test_ldap_registration_from_confirmation(self) -> None:
)
)
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

Expand Down Expand Up @@ -2948,7 +2948,7 @@ def test_ldap_populate_only_registration_from_confirmation(self) -> None:
)
)
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

Expand Down Expand Up @@ -3032,7 +3032,7 @@ def test_ldap_registration_email_backend_disabled_bypass_attempt(self) -> None:
)
)
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,
Expand Down Expand Up @@ -3109,7 +3109,7 @@ def test_ldap_registration_end_to_end(self) -> None:
)
)
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,
Expand Down Expand Up @@ -3185,7 +3185,7 @@ def test_ldap_split_full_name_mapping(self) -> None:
)
)
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,
Expand Down Expand Up @@ -3335,7 +3335,7 @@ def test_ldap_registration_when_names_changes_are_disabled(self) -> None:
)
)
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,
Expand Down Expand Up @@ -3390,7 +3390,7 @@ def test_signup_with_ldap_and_email_enabled_using_email_with_ldap_append_domain(
)
)
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
Expand Down Expand Up @@ -3516,7 +3516,7 @@ def test_signup_with_ldap_and_email_enabled_using_email_with_ldap_email_search(s
)
)
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,
Expand Down Expand Up @@ -3561,7 +3561,7 @@ def test_signup_with_ldap_and_email_enabled_using_email_with_ldap_email_search(s
)
)
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",
Expand Down Expand Up @@ -3722,7 +3722,7 @@ def test_registration_when_name_changes_are_disabled(self) -> None:
)
)
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(
Expand Down Expand Up @@ -3755,7 +3755,7 @@ def test_realm_creation_through_ldap(self) -> None:
)
)
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

Expand Down Expand Up @@ -3821,7 +3821,7 @@ def test_registration_of_mirror_dummy_user(self, ignored: Any) -> None:
)
)
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

Expand Down

0 comments on commit 95f8ab1

Please sign in to comment.