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: Remove usage of `control-group` and `control-label` class.

Ganesh Pawarf6f85f98a7b4
diff --git a/static/styles/portico/portico.css b/static/styles/portico/portico.css
index fdbbc3fe5e8..e7324212275 100644
--- a/static/styles/portico/portico.css
+++ b/static/styles/portico/portico.css
@@ -854,11 +854,7 @@ input.new-organization-button {
.login-form,
.register-form {
- .control-label {
- margin-bottom: 2px;
- }
-
- .control-group {
+ .controls {
margin-right: 10px;
}
}
@@ -924,10 +920,6 @@ input.new-organization-button {
margin-top: 20px;
}
- .control-group .control-label {
- display: block;
- }
-
.pitch {
width: auto;
}
@@ -1018,6 +1010,17 @@ input.new-organization-button {
text-align: center;
}
+#registration-email {
+ label {
+ float: left;
+ padding-top: 5px;
+ width: 100%;
+ display: block;
+ margin: 0;
+ text-align: left;
+ }
+}
+
.center-block {
text-align: left;
display: inline-block;
@@ -1027,20 +1030,9 @@ input.new-organization-button {
margin-bottom: 20px;
}
- .control-group {
- margin-bottom: 10px;
-
- label {
- width: 100%;
- display: block;
- margin: 0;
- text-align: left;
- }
-
- .controls {
- margin: 0;
- text-align: left;
- }
+ .controls {
+ margin: 0;
+ text-align: left;
}
#send_confirm input[type="text"] {
diff --git a/static/styles/portico/portico_signin.css b/static/styles/portico/portico_signin.css
index fdfa4256315..10c8b9bf679 100644
--- a/static/styles/portico/portico_signin.css
+++ b/static/styles/portico/portico_signin.css
@@ -303,7 +303,7 @@ html {
.center-block {
max-width: 800px;
- .control-group {
+ .controls {
margin-bottom: 5px;
}
}
diff --git a/templates/zerver/accounts_accept_terms.html b/templates/zerver/accounts_accept_terms.html
index deb9bf5836f..39405a28cd9 100644
--- a/templates/zerver/accounts_accept_terms.html
+++ b/templates/zerver/accounts_accept_terms.html
@@ -16,8 +16,8 @@ the registration flow has its own (nearly identical) copy of the fields below in
<div class="form-horizontal white-box">
<form method="post" class="form-horizontal" id="registration" action="{{ url('accept_terms') }}">
{{ csrf_input }}
- <div class="control-group">
- <label for="id_email" class="control-label">{{ _("Email") }}</label>
+ <div id="registration-email">
+ <label for="id_email">{{ _("Email") }}</label>
<div class="controls fakecontrol">
<p>{{ email }}</p>
</div>
@@ -52,11 +52,9 @@ the registration flow has its own (nearly identical) copy of the fields below in
{% endfor %}
{% endif %}
</div>
- <div class="control-group">
- <div class="controls">
- <button id="accept_tos_button" type="submit">{{ _('Accept') }}</button>
- <input type="hidden" name="next" value="{{ next }}" />
- </div>
+ <div class="controls">
+ <button id="accept_tos_button" type="submit">{{ _('Accept') }}</button>
+ <input type="hidden" name="next" value="{{ next }}" />
</div>
</form>
</div>
diff --git a/templates/zerver/development/dev_login.html b/templates/zerver/development/dev_login.html
index c91498655de..c76ff2330bb 100644
--- a/templates/zerver/development/dev_login.html
+++ b/templates/zerver/development/dev_login.html
@@ -16,75 +16,73 @@ page can be easily identified in it's respective JavaScript file -->
<p class="devlogin_subheader">(Or visit the <a href="/login/">normal login page</a>.)</p>
<form name="direct_login_form" id="direct_login_form" method="post" class="login-form">
<input type="hidden" name="next" value="{{ next }}" />
- <div class="control-group">
- <div class="controls">
- <div class="group">
- {% if realm_web_public_access_enabled %}
- <h2>{{_('Anonymous user') }}</h2>
+ <div class="controls">
+ <div class="group">
+ {% if realm_web_public_access_enabled %}
+ <h2>{{_('Anonymous user') }}</h2>
+ <p>
+ <input type="submit" formaction="{{ current_realm.uri }}{{ url('login-local') }}"
+ name="prefers_web_public_view" class="btn-direct btn-admin" value="Anonymous login" />
+ </p>
+ {% endif %}
+ <h2>{{_('Owners') }}</h2>
+ {% if direct_owners %}
+ {% for direct_owner in direct_owners %}
<p>
- <input type="submit" formaction="{{ current_realm.uri }}{{ url('login-local') }}"
- name="prefers_web_public_view" class="btn-direct btn-admin" value="Anonymous login" />
+ <input type="submit" formaction="{{ direct_owner.realm.uri }}{{ url('login-local') }}"
+ name="direct_email" class="btn-direct btn-admin" value="{{ direct_owner.delivery_email }}" />
</p>
- {% endif %}
- <h2>{{_('Owners') }}</h2>
- {% if direct_owners %}
- {% for direct_owner in direct_owners %}
- <p>
- <input type="submit" formaction="{{ direct_owner.realm.uri }}{{ url('login-local') }}"
- name="direct_email" class="btn-direct btn-admin" value="{{ direct_owner.delivery_email }}" />
- </p>
- {% endfor %}
- {% else %}
- <p>No owners found in this realm</p>
- {% endif %}
- <h2>{{ _('Administrators') }}</h2>
- {% if direct_admins %}
- {% for direct_admin in direct_admins %}
- <p>
- <input type="submit" formaction="{{ direct_admin.realm.uri }}{{ url('login-local') }}"
- name="direct_email" class="btn-direct btn-admin" value="{{ direct_admin.delivery_email }}" />
- </p>
- {% endfor %}
- {% else %}
- <p>No administrators found in this realm</p>
- {% endif %}
- <h2>{{ _('Moderators') }}</h2>
- {% if direct_moderators %}
- {% for direct_moderator in direct_moderators %}
- <p>
- <input type="submit" formaction="{{ direct_moderator.realm.uri }}{{ url('login-local') }}"
- name="direct_email" class="btn-direct btn-admin" value="{{ direct_moderator.delivery_email }}" />
- </p>
- {% endfor %}
- {% else %}
- <p>No moderators found in this realm</p>
- {% endif %}
- <h2>{{ _('Guest users') }}</h2>
- {% if guest_users %}
- {% for guest_user in guest_users %}
- <p>
- <input type="submit" formaction="{{ guest_user.realm.uri }}{{ url('login-local') }}"
- name="direct_email" class="btn-direct btn-admin" value="{{ guest_user.delivery_email }}" />
- </p>
- {% endfor %}
- {% else %}
- <p>No guest users found in this realm</p>
- {% endif %}
- </div>
+ {% endfor %}
+ {% else %}
+ <p>No owners found in this realm</p>
+ {% endif %}
+ <h2>{{ _('Administrators') }}</h2>
+ {% if direct_admins %}
+ {% for direct_admin in direct_admins %}
+ <p>
+ <input type="submit" formaction="{{ direct_admin.realm.uri }}{{ url('login-local') }}"
+ name="direct_email" class="btn-direct btn-admin" value="{{ direct_admin.delivery_email }}" />
+ </p>
+ {% endfor %}
+ {% else %}
+ <p>No administrators found in this realm</p>
+ {% endif %}
+ <h2>{{ _('Moderators') }}</h2>
+ {% if direct_moderators %}
+ {% for direct_moderator in direct_moderators %}
+ <p>
+ <input type="submit" formaction="{{ direct_moderator.realm.uri }}{{ url('login-local') }}"
+ name="direct_email" class="btn-direct btn-admin" value="{{ direct_moderator.delivery_email }}" />
+ </p>
+ {% endfor %}
+ {% else %}
+ <p>No moderators found in this realm</p>
+ {% endif %}
+ <h2>{{ _('Guest users') }}</h2>
+ {% if guest_users %}
+ {% for guest_user in guest_users %}
+ <p>
+ <input type="submit" formaction="{{ guest_user.realm.uri }}{{ url('login-local') }}"
+ name="direct_email" class="btn-direct btn-admin" value="{{ guest_user.delivery_email }}" />
+ </p>
+ {% endfor %}
+ {% else %}
+ <p>No guest users found in this realm</p>
+ {% endif %}
+ </div>
- <div class="group">
- <h2>{{ _('Normal users') }}</h2>
- {% if direct_users %}
- {% for direct_user in direct_users %}
- <p>
- <input type="submit" formaction="{{ direct_user.realm.uri }}{{ url('login-local') }}"
- name="direct_email" class="btn-direct btn-admin" value="{{ direct_user.delivery_email }}" />
- </p>
- {% endfor %}
- {% else %}
- <p>No normal users found in this realm</p>
- {% endif %}
- </div>
+ <div class="group">
+ <h2>{{ _('Normal users') }}</h2>
+ {% if direct_users %}
+ {% for direct_user in direct_users %}
+ <p>
+ <input type="submit" formaction="{{ direct_user.realm.uri }}{{ url('login-local') }}"
+ name="direct_email" class="btn-direct btn-admin" value="{{ direct_user.delivery_email }}" />
+ </p>
+ {% endfor %}
+ {% else %}
+ <p>No normal users found in this realm</p>
+ {% endif %}
</div>
</div>
</form>
diff --git a/templates/zerver/login.html b/templates/zerver/login.html
index c5d643d8d8d..85049ec9a14 100644
--- a/templates/zerver/login.html
+++ b/templates/zerver/login.html
@@ -90,7 +90,7 @@ page can be easily identified in it's respective JavaScript file. -->
<input id="id_password" name="password" class="required" type="password" autocomplete="off"
{% if email %} autofocus {% endif %}
required />
- <label for="id_password" class="control-label">{{ _('Password') }}</label>
+ <label for="id_password">{{ _('Password') }}</label>
<i class="fa fa-eye-slash password_visibility_toggle" role="button"></i>
</div>
{% else %}