mirror of https://github.com/zulip/zulip.git
register.html: Fix indentiation via check-templates.
This commit is contained in:
parent
0995780f82
commit
47b4056948
|
@ -14,154 +14,154 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser
|
|||
|
||||
{% block portico_content %}
|
||||
<div class="register-account flex full-page">
|
||||
<div class="center-block new-style" style="padding: 20px 0px">
|
||||
<div class="pitch">
|
||||
{% trans %}
|
||||
<h1>You're almost there.</h1>
|
||||
<p>
|
||||
We just need you to do one last thing.
|
||||
</p>
|
||||
{% endtrans %}
|
||||
</div>
|
||||
<div class="center-block new-style" style="padding: 20px 0px">
|
||||
|
||||
<form method="post" class="form-horizontal white-box" id="registration" action="{{ url('zerver.views.registration.accounts_register') }}">
|
||||
{{ csrf_input }}
|
||||
<div class="input-box no-validation">
|
||||
<input type='hidden' name='key' value='{{ key }}' />
|
||||
<input type='hidden' name='timezone' id='timezone'/>
|
||||
<input id="id_email" type='text' disabled="true" placeholder="{{ email }}" required />
|
||||
<label for="id_email" class="inline-block label-title">{{ _('Email') }}</label>
|
||||
<div class="required"></div>
|
||||
<div class="pitch">
|
||||
{% trans %}
|
||||
<h1>You're almost there.</h1>
|
||||
<p>We just need you to do one last thing.</p>
|
||||
{% endtrans %}
|
||||
</div>
|
||||
|
||||
<div class="input-box">
|
||||
{% if lock_name %}
|
||||
<p class="fakecontrol">{{ full_name }}</p>
|
||||
{% else %}
|
||||
<input id="id_full_name" class="required" type="text" name="full_name"
|
||||
value="{% if full_name %}{{ full_name }}{% elif form.full_name.value() %}{{ form.full_name.value() }}{% endif %}"
|
||||
maxlength={{ MAX_NAME_LENGTH }} placeholder="{% trans %}Full name or 名前{% endtrans %}" required />
|
||||
<label for="id_full_name" class="inline-block label-title">{{ _('Full name') }}</label>
|
||||
{% if form.full_name.errors %}
|
||||
{% for error in form.full_name.errors %}
|
||||
<p class="help-inline text-error">{{ error }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<form method="post" class="form-horizontal white-box" id="registration" action="{{ url('zerver.views.registration.accounts_register') }}">
|
||||
{{ csrf_input }}
|
||||
|
||||
{% if password_auth_enabled %}
|
||||
<div class="input-box">
|
||||
<input id="id_password" class="required" type="password" name="password"
|
||||
value="{% if form.password.value() %}{{ form.password.value() }}{% endif %}"
|
||||
maxlength={{ MAX_PASSWORD_LENGTH }}
|
||||
data-min-length="{{password_min_length}}"
|
||||
data-min-quality="{{password_min_quality}}" required />
|
||||
<label for="id_password" class="inline-block">{{ _('Password') }}</label>
|
||||
{% if full_name %}
|
||||
<span class="help-inline">
|
||||
{{ _('This is used for mobile applications and other tools that require a password.') }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if form.password.errors %}
|
||||
{% for error in form.password.errors %}
|
||||
<p class="help-inline text-error">{{ error }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<div class="progress" id="pw_strength" title="{{ _('Password strength') }}">
|
||||
<div class="bar bar-danger" style="width: 10%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if creating_new_team %}
|
||||
<div class="input-box">
|
||||
<div class="inline-block relative">
|
||||
<input id="id_team_name" class="required" type="text"
|
||||
placeholder="Acme or Aκμή"
|
||||
value="{% if form.realm_name.value() %}{{ form.realm_name.value() }}{% endif %}"
|
||||
name="realm_name" maxlength={{ MAX_REALM_NAME_LENGTH }} required />
|
||||
<div class="input-box no-validation">
|
||||
<input type='hidden' name='key' value='{{ key }}' />
|
||||
<input type='hidden' name='timezone' id='timezone'/>
|
||||
<input id="id_email" type='text' disabled="true" placeholder="{{ email }}" required />
|
||||
<label for="id_email" class="inline-block label-title">{{ _('Email') }}</label>
|
||||
<div class="required"></div>
|
||||
</div>
|
||||
<label for="id_team_name" class="inline-block label-title">{{ _('Organization name') }}</label>
|
||||
{% if form.realm_name.errors %}
|
||||
{% for error in form.realm_name.errors %}
|
||||
|
||||
<div class="input-box">
|
||||
{% if lock_name %}
|
||||
<p class="fakecontrol">{{ full_name }}</p>
|
||||
{% else %}
|
||||
<input id="id_full_name" class="required" type="text" name="full_name"
|
||||
value="{% if full_name %}{{ full_name }}{% elif form.full_name.value() %}{{ form.full_name.value() }}{% endif %}"
|
||||
maxlength={{ MAX_NAME_LENGTH }} placeholder="{% trans %}Full name or 名前{% endtrans %}" required />
|
||||
<label for="id_full_name" class="inline-block label-title">{{ _('Full name') }}</label>
|
||||
{% if form.full_name.errors %}
|
||||
{% for error in form.full_name.errors %}
|
||||
<p class="help-inline text-error">{{ error }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if password_auth_enabled %}
|
||||
<div class="input-box">
|
||||
<input id="id_password" class="required" type="password" name="password"
|
||||
value="{% if form.password.value() %}{{ form.password.value() }}{% endif %}"
|
||||
maxlength={{ MAX_PASSWORD_LENGTH }}
|
||||
data-min-length="{{password_min_length}}"
|
||||
data-min-quality="{{password_min_quality}}" required />
|
||||
<label for="id_password" class="inline-block">{{ _('Password') }}</label>
|
||||
{% if full_name %}
|
||||
<span class="help-inline">
|
||||
{{ _('This is used for mobile applications and other tools that require a password.') }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if form.password.errors %}
|
||||
{% for error in form.password.errors %}
|
||||
<p class="help-inline text-error">{{ error }}</p>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="progress" id="pw_strength" title="{{ _('Password strength') }}">
|
||||
<div class="bar bar-danger" style="width: 10%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="help-box margin-top">
|
||||
{{ _('Shorter is better than longer.') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input-box">
|
||||
<label for="id_team_subdomain" class="inline-block label-title">
|
||||
{% if realms_have_subdomains %}
|
||||
{{ _('Subdomain') }}
|
||||
{% else %}
|
||||
{{ _('Short name') }}
|
||||
{% endif %}
|
||||
</label>
|
||||
<div class="breakpoint">
|
||||
{% if creating_new_team %}
|
||||
<div class="input-box">
|
||||
<div class="inline-block relative">
|
||||
<input id="id_team_subdomain" class="required" type="text"
|
||||
placeholder="acme"
|
||||
value="{% if form.realm_subdomain.value() %}{{ form.realm_subdomain.value() }}{% endif %}"
|
||||
name="realm_subdomain" maxlength={{ MAX_REALM_SUBDOMAIN_LENGTH }} required />
|
||||
<input id="id_team_name" class="required" type="text"
|
||||
placeholder="Acme or Aκμή"
|
||||
value="{% if form.realm_name.value() %}{{ form.realm_name.value() }}{% endif %}"
|
||||
name="realm_name" maxlength={{ MAX_REALM_NAME_LENGTH }} required />
|
||||
<div class="required"></div>
|
||||
</div>
|
||||
{% if realms_have_subdomains %}
|
||||
<div class="inline-block external-host"> .{{ external_host }}</div>
|
||||
{% endif %}
|
||||
<p id="id_team_subdomain_error_client" class="error help-inline text-error"></p>
|
||||
{% if form.realm_subdomain.errors %}
|
||||
{% for error in form.realm_subdomain.errors %}
|
||||
<p class="error help-inline text-error team_subdomain_error_server">{{ error }}</p>
|
||||
<label for="id_team_name" class="inline-block label-title">{{ _('Organization name') }}</label>
|
||||
{% if form.realm_name.errors %}
|
||||
{% for error in form.realm_name.errors %}
|
||||
<p class="help-inline text-error">{{ error }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="help-box margin-top">
|
||||
{% if realms_have_subdomains %}
|
||||
{{ _("The address you'll use to sign in to your organization.") }}
|
||||
{% else %}
|
||||
{{ _("a-z, 0-9, and - only.") }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="input-group margin terms-of-service">
|
||||
{% if terms_of_service %}
|
||||
<div class="input-group">
|
||||
{#
|
||||
This is somewhat subtle.
|
||||
Checkboxes have a name and value, and when the checkbox is ticked, the form posts
|
||||
with name=value. If the checkbox is unticked, the field just isn't present at all.
|
||||
<div class="help-box margin-top">
|
||||
{{ _('Shorter is better than longer.') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
This is distinct from 'checked', which determines whether the checkbox appears
|
||||
at all. (So, it's not symmetric to the code above.)
|
||||
#}
|
||||
<input id="id_terms" class="required" type="checkbox" name="terms"
|
||||
{% if form.terms.value() %}checked="checked"{% endif %} />
|
||||
<label for="id_terms" class="inline-block">
|
||||
{% trans %}I agree to the <a href="{{ server_uri }}/terms" target="_blank">Terms of Service</a>.{% endtrans %}
|
||||
<div class="input-box">
|
||||
<label for="id_team_subdomain" class="inline-block label-title">
|
||||
{% if realms_have_subdomains %}
|
||||
{{ _('Subdomain') }}
|
||||
{% else %}
|
||||
{{ _('Short name') }}
|
||||
{% endif %}
|
||||
</label>
|
||||
{% if form.terms.errors %}
|
||||
{% for error in form.terms.errors %}
|
||||
<div class="help-inline text-error">{{ error }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="breakpoint">
|
||||
<div class="inline-block relative">
|
||||
<input id="id_team_subdomain" class="required" type="text"
|
||||
placeholder="acme"
|
||||
value="{% if form.realm_subdomain.value() %}{{ form.realm_subdomain.value() }}{% endif %}"
|
||||
name="realm_subdomain" maxlength={{ MAX_REALM_SUBDOMAIN_LENGTH }} required />
|
||||
<div class="required"></div>
|
||||
</div>
|
||||
{% if realms_have_subdomains %}
|
||||
<div class="inline-block external-host"> .{{ external_host }}</div>
|
||||
{% endif %}
|
||||
<p id="id_team_subdomain_error_client" class="error help-inline text-error"></p>
|
||||
{% if form.realm_subdomain.errors %}
|
||||
{% for error in form.realm_subdomain.errors %}
|
||||
<p class="error help-inline text-error team_subdomain_error_server">{{ error }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="help-box margin-top">
|
||||
{% if realms_have_subdomains %}
|
||||
{{ _("The address you'll use to sign in to your organization.") }}
|
||||
{% else %}
|
||||
{{ _("a-z, 0-9, and - only.") }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="submit-button-box m-10">
|
||||
<button type="submit">{{ _('Register') }}</button>
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
|
||||
<div class="input-group margin terms-of-service">
|
||||
{% if terms_of_service %}
|
||||
<div class="input-group">
|
||||
{#
|
||||
This is somewhat subtle.
|
||||
Checkboxes have a name and value, and when the checkbox is ticked, the form posts
|
||||
with name=value. If the checkbox is unticked, the field just isn't present at all.
|
||||
|
||||
This is distinct from 'checked', which determines whether the checkbox appears
|
||||
at all. (So, it's not symmetric to the code above.)
|
||||
#}
|
||||
<input id="id_terms" class="required" type="checkbox" name="terms"
|
||||
{% if form.terms.value() %}checked="checked"{% endif %} />
|
||||
<label for="id_terms" class="inline-block">
|
||||
{% trans %}I agree to the <a href="{{ server_uri }}/terms" target="_blank">Terms of Service</a>.{% endtrans %}
|
||||
</label>
|
||||
{% if form.terms.errors %}
|
||||
{% for error in form.terms.errors %}
|
||||
<div class="help-inline text-error">{{ error }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="submit-button-box m-10">
|
||||
<button type="submit">{{ _('Register') }}</button>
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -134,7 +134,6 @@ def check_html_templates(templates, all_dups):
|
|||
'templates/zerver/login.html',
|
||||
'templates/zerver/markdown_help.html',
|
||||
'templates/zerver/navbar.html',
|
||||
'templates/zerver/register.html',
|
||||
'zerver/webhooks/stripe/doc.html',
|
||||
'zerver/webhooks/wordpress/doc.html',
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue