From 01a92b17c16661f0732dcaf936bca2a59dc1de24 Mon Sep 17 00:00:00 2001 From: Harsh Bansal Date: Thu, 21 Nov 2024 01:54:54 +0000 Subject: [PATCH] portico: Improve layout of the /go page Fixes #32198: 1. Left-aligned the elements inside the input white box. 2. Changed the text: 'Enter your organization's Zulip URL' -> 'Organization URL' 3. Moved 'Don't know your organization URL? Find your organization.' to be just below the URL field. --- templates/zerver/realm_redirect.html | 10 +++++----- web/styles/portico/portico_signin.css | 3 +-- zerver/tests/test_signup.py | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/templates/zerver/realm_redirect.html b/templates/zerver/realm_redirect.html index 0f7dafdd3e..1960c2d65f 100644 --- a/templates/zerver/realm_redirect.html +++ b/templates/zerver/realm_redirect.html @@ -19,7 +19,7 @@ {{ csrf_input }}
-

{{ _("Enter your organization's Zulip URL:") }}

+

{{ _("Organization URL:") }}

{% if form.subdomain.errors %} - {% for error in form.subdomain.errors %} -
{{ error }}
- {% endfor %} + {% for error in form.subdomain.errors %} +
{{ error }}
+ {% endfor %} {% endif %}
-

{{ _("Don't know your organization URL?") }} {{ _("Find your organization.") }}

+
diff --git a/web/styles/portico/portico_signin.css b/web/styles/portico/portico_signin.css index 2b48fb8532..4b882fb0d9 100644 --- a/web/styles/portico/portico_signin.css +++ b/web/styles/portico/portico_signin.css @@ -1195,9 +1195,8 @@ button#register_auth_button_gitlab { .goto-account-page { #realm_redirect_subdomain { - text-align: right; position: relative; - padding-right: 10px; + padding-left: 10px; } #realm_redirect_external_host { diff --git a/zerver/tests/test_signup.py b/zerver/tests/test_signup.py index 8ab0bfd07b..00300bd221 100644 --- a/zerver/tests/test_signup.py +++ b/zerver/tests/test_signup.py @@ -4712,7 +4712,7 @@ class NameRestrictionsTest(ZulipTestCase): class RealmRedirectTest(ZulipTestCase): def test_realm_redirect_without_next_param(self) -> None: result = self.client_get("/accounts/go/") - self.assert_in_success_response(["Enter your organization's Zulip URL"], result) + self.assert_in_success_response(["Organization URL"], result) result = self.client_post("/accounts/go/", {"subdomain": "zephyr"}) self.assertEqual(result.status_code, 302) @@ -4724,7 +4724,7 @@ class RealmRedirectTest(ZulipTestCase): def test_realm_redirect_with_next_param(self) -> None: result = self.client_get("/accounts/go/", {"next": "billing"}) self.assert_in_success_response( - ["Enter your organization's Zulip URL", 'action="/accounts/go/?next=billing"'], result + ["Organization URL", 'action="/accounts/go/?next=billing"'], result ) result = self.client_post("/accounts/go/?next=billing", {"subdomain": "lear"})