Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
portico: Add hint text for invite only realm on /login.
Siddharth Varshneybbb07aed38fc
diff --git a/static/styles/portico/portico-signin.scss b/static/styles/portico/portico-signin.scssindex bfc81133d2a..cbcc1338bef 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.htmlindex 761dfdbd615..3269d65a418 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 %}</div></div>++ {% if realm_invite_required %}+ <div class="contact-admin">+ <p class="invite-hint">{{ _("Don't have an account yet? You need to be invited to join this organization.") }}</p>+ </div>+ {% endif %}</div></div>diff --git a/zerver/tests/test_signup.py b/zerver/tests/test_signup.pyindex 6541ca18f2d..00b81b53296 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/')