Skip to content

Commit

Permalink
portico: Improve layout of /go page.
Browse files Browse the repository at this point in the history
Made the input field of the page consistent with
the other similar pages. Here are I have done the following things:
1. Changed text 'Enter your organization's Zulip URL:'->'Organization URL'.
2. Left aligned the label and button to make it consistent.
3. Moved 'Don't know your organization URL? Find your organization.' to be
just below the URL field.
4. Changed the placeholder 'your-organization-url' -> 'your-organization'

Fixes zulip#32198
  • Loading branch information
Harshbansal8705 authored and timabbott committed Dec 18, 2024
1 parent f2a22b4 commit 4d3cc2c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
8 changes: 4 additions & 4 deletions templates/zerver/realm_redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ <h1 class="get-started">{{ _("Log in to your organization") }}</h1>
{{ 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"
placeholder="{{ _('your-organization') }}" autofocus id="realm_redirect_subdomain" name="subdomain"
autocomplete="off" required/>
<span id="realm_redirect_external_host">.{{external_host}}</span>
</div>
Expand All @@ -33,11 +33,11 @@ <h1 class="get-started">{{ _("Log in to your organization") }}</h1>
{% endfor %}
{% endif %}
</div>
<button id="enter-realm-button" type="submit">{{ _('Next') }}</button>
<p class="bottom-text">
<p class="bottom-text left-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>
Expand Down
2 changes: 1 addition & 1 deletion tools/lib/capitalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
# Emoji name placeholder
r"leafy green vegetable",
# Subdomain placeholder
r"your-organization-url",
r"your-organization",
# Used in invite modal
r"or",
# Units
Expand Down
8 changes: 8 additions & 0 deletions web/styles/portico/portico_signin.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ html {
}
}

.left-text {
text-align: left;
margin-top: 0;
}

#new-realm-creation {
.get-started {
font-size: 2rem;
Expand Down Expand Up @@ -1210,6 +1215,9 @@ button#register_auth_button_gitlab {
#realm_redirect_description {
top: 15px;
position: relative;
text-align: left;
font-weight: 600;
margin-bottom: -5px;
}

#enter-realm-button {
Expand Down
4 changes: 2 additions & 2 deletions zerver/tests/test_signup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4698,7 +4698,7 @@ def test_whitelisted_disposable_domains(self) -> None:
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)
Expand All @@ -4710,7 +4710,7 @@ def test_realm_redirect_without_next_param(self) -> None:
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"})
Expand Down

0 comments on commit 4d3cc2c

Please sign in to comment.