diff --git a/static/styles/portico/portico-signin.scss b/static/styles/portico/portico-signin.scss index bfc81133d2..cbcc1338be 100644 --- a/static/styles/portico/portico-signin.scss +++ b/static/styles/portico/portico-signin.scss @@ -506,6 +506,12 @@ html { .inline-block { text-align: left; } + + .contact-admin p.invite-hint { + font-size: 1.3rem; + margin-top: 0.8rem; + text-align: center; + } } #login_form { diff --git a/templates/zerver/login.html b/templates/zerver/login.html index 761dfdbd61..3269d65a41 100644 --- a/templates/zerver/login.html +++ b/templates/zerver/login.html @@ -131,6 +131,12 @@ page can be easily identified in it's respective JavaScript file. --> {% endif %} + + {% if realm_invite_required %} +
+

{{ _("Don't have an account yet? You need to be invited to join this organization.") }}

+
+ {% endif %} diff --git a/zerver/tests/test_signup.py b/zerver/tests/test_signup.py index 6541ca18f2..00b81b5329 100644 --- a/zerver/tests/test_signup.py +++ b/zerver/tests/test_signup.py @@ -3956,6 +3956,16 @@ class TestLoginPage(ZulipTestCase): result = self.client_get("/en/login/") self.assertEqual(result.status_code, 200) + def test_login_page_registration_hint(self) -> None: + response = self.client_get("/login/") + self.assert_not_in_success_response(["Don't have an account yet? You need to be invited to join this organization."], response) + + realm = get_realm("zulip") + realm.invite_required = True + realm.save(update_fields=["invite_required"]) + response = self.client_get("/login/") + self.assert_in_success_response(["Don't have an account yet? You need to be invited to join this organization."], response) + class TestFindMyTeam(ZulipTestCase): def test_template(self) -> None: result = self.client_get('/accounts/find/')