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.

register: Refactor template for new account registration.

Sahil Batrae14b1f03fa37
diff --git a/static/styles/portico/portico_signin.css b/static/styles/portico/portico_signin.css
index d751a3a4afc..9087a110692 100644
--- a/static/styles/portico/portico_signin.css
+++ b/static/styles/portico/portico_signin.css
@@ -1053,16 +1053,6 @@ button#register_auth_button_gitlab {
font-size: 22px;
}
-#source_realm_select {
- font-size: 1.2rem;
- height: 45px;
- width: 325px;
-
- &:focus {
- outline: none;
- }
-}
-
.goto-account-page {
#realm_redirect_subdomain {
text-align: right;
diff --git a/templates/zerver/register.html b/templates/zerver/register.html
index b460d302d3c..4c528f03bbb 100644
--- a/templates/zerver/register.html
+++ b/templates/zerver/register.html
@@ -124,25 +124,25 @@ Form is validated both client-side using jquery-validation (see signup.js) and s
{% if accounts %}
<div class="input-box">
+ <div class="inline-block relative">
+ <select class="select" name="source_realm_id" id="source_realm_select">
+ <option value=""
+ {% if "source_realm_id" in form.data and form.data["source_realm_id"] == "" %}selected {% endif %}>
+ {{ _('Don&rsquo;t import settings') }}
+ </option>
+ {% for account in accounts %}
+ <option value="{{ account.realm_id }}" data-full-name="{{account.full_name}}" data-avatar="{{account.avatar}}"
+ {% if ("source_realm_id" in form.data and account.realm_id == form.data["source_realm_id"]|int)
+ or ("source_realm_id" not in form.data and loop.index0 == 0) %} selected {% endif %}>
+ {{ account.realm_name }}
+ </option>
+ {% endfor %}
+ </select>
+ </div>
<label for="source_realm_id" class="inline-block">{{ _('Import settings from existing Zulip account') }}
<a href="{{ root_domain_uri }}/help/import-your-settings"><i class="fa fa-question-circle"></i></a>
</label>
</div>
- <div id="source_realm_select_section" class="input-group m-10 inline-block">
- <select class="select" name="source_realm_id" id="source_realm_select">
- <option value=""
- {% if "source_realm_id" in form.data and form.data["source_realm_id"] == "" %}selected {% endif %}>
- {{ _('Don&rsquo;t import settings') }}
- </option>
- {% for account in accounts %}
- <option value="{{ account.realm_id }}" data-full-name="{{account.full_name}}" data-avatar="{{account.avatar}}"
- {% if ("source_realm_id" in form.data and account.realm_id == form.data["source_realm_id"]|int)
- or ("source_realm_id" not in form.data and loop.index0 == 0) %} selected {% endif %}>
- {{ account.realm_name }}
- </option>
- {% endfor %}
- </select>
- </div>
{% endif %}
<div class="input-box" id="full_name_input_section">
diff --git a/zerver/tests/test_signup.py b/zerver/tests/test_signup.py
index c512bd29155..e83473b2bd8 100644
--- a/zerver/tests/test_signup.py
+++ b/zerver/tests/test_signup.py
@@ -4656,7 +4656,7 @@ class UserSignUpTest(InviteUserBase):
self.assert_in_success_response(
[
"Import settings from existing Zulip account",
- "selected >\n Zulip Dev",
+ "selected >\n Zulip Dev",
"We just need you to do one last thing.",
],
result,