Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

portico: Improve layout of /go page.

Harsh Bansal4d3cc2c5a5a5
diff --git a/templates/zerver/realm_redirect.html b/templates/zerver/realm_redirect.html
index 0f7dafdd3e2..451cacdb4d0 100644
--- a/templates/zerver/realm_redirect.html
+++ b/templates/zerver/realm_redirect.html
@@ -19,10 +19,10 @@
{{ 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>
@@ -33,11 +33,11 @@
{% 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>
diff --git a/tools/lib/capitalization.py b/tools/lib/capitalization.py
index 6d127d3f10c..7cde496006a 100644
--- a/tools/lib/capitalization.py
+++ b/tools/lib/capitalization.py
@@ -128,7 +128,7 @@ IGNORED_PHRASES = [
# Emoji name placeholder
r"leafy green vegetable",
# Subdomain placeholder
- r"your-organization-url",
+ r"your-organization",
# Used in invite modal
r"or",
# Units
diff --git a/web/styles/portico/portico_signin.css b/web/styles/portico/portico_signin.css
index 190af1fcf78..0077cf6f610 100644
--- a/web/styles/portico/portico_signin.css
+++ b/web/styles/portico/portico_signin.css
@@ -46,6 +46,11 @@ html {
}
}
+.left-text {
+ text-align: left;
+ margin-top: 0;
+}
+
#new-realm-creation {
.get-started {
font-size: 2rem;
@@ -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 {
diff --git a/zerver/tests/test_signup.py b/zerver/tests/test_signup.py
index 743b46c1b53..5c320fa1d22 100644
--- a/zerver/tests/test_signup.py
+++ b/zerver/tests/test_signup.py
@@ -4698,7 +4698,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)
@@ -4710,7 +4710,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"})