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.
This commit is contained in:
Harsh Bansal 2024-11-21 01:54:54 +00:00
parent 65f05794ee
commit 01a92b17c1
3 changed files with 8 additions and 9 deletions

View File

@ -19,7 +19,7 @@
{{ csrf_input }}
<div class="input-box horizontal">
<div class="inline-block relative">
<p id="realm_redirect_description">{{ _("Enter your organization's Zulip URL:") }}</p>
<p id="realm_redirect_description">{{ _("Organization URL:") }}</p>
<input
type="text" value="{% if form.subdomain.value() %}{{ form.subdomain.value() }}{% endif %}"
placeholder="{{ _('your-organization-url') }}" autofocus id="realm_redirect_subdomain" name="subdomain"
@ -33,11 +33,11 @@
{% endfor %}
{% endif %}
</div>
<button id="enter-realm-button" type="submit">{{ _('Next') }}</button>
<p class="bottom-text">
{{ _("Don't know your organization URL?") }}
<a target="_blank" rel="noopener noreferrer" href="/accounts/find/">{{ _("Find your organization.") }}</a>
</p>
<button id="enter-realm-button" type="submit">{{ _('Next') }}</button>
</div>
</form>
</div>

View File

@ -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 {

View File

@ -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"})