2013-07-29 23:03:31 +02:00
|
|
|
{% extends "zerver/portico_signup.html" %}
|
2013-04-08 21:24:44 +02:00
|
|
|
{% block customhead %}
|
2016-04-21 08:48:33 +02:00
|
|
|
{{ super() }}
|
2013-04-08 21:24:44 +02:00
|
|
|
<script type="text/javascript" src="/static/third/zxcvbn/zxcvbn.js"></script>
|
|
|
|
{% endblock %}
|
|
|
|
|
2012-11-05 19:53:16 +01:00
|
|
|
{% block portico_content %}
|
|
|
|
|
2016-08-16 19:25:18 +02:00
|
|
|
<div class="password-container">
|
2016-08-16 19:28:02 +02:00
|
|
|
<div class="password-reset">
|
|
|
|
<!-- TODO: Ask about meta viewport 1:1 scaling -->
|
|
|
|
<div class="pitch">
|
2016-10-13 13:16:07 +02:00
|
|
|
<h3>{{ _('Reset your password.') }}</h3>
|
2016-08-16 19:28:02 +02:00
|
|
|
</div>
|
2012-11-05 19:53:16 +01:00
|
|
|
|
2016-08-16 19:25:18 +02:00
|
|
|
{% if validlink %}
|
2016-08-16 19:28:02 +02:00
|
|
|
<form method="post" id="password_reset" class="form-horizontal" autocomplete="off">
|
2016-08-16 19:25:18 +02:00
|
|
|
{{ csrf_input }}
|
2016-08-16 19:28:02 +02:00
|
|
|
<div class="input-group" id="email-section">
|
|
|
|
<label for="id_email">{{ _("Email") }}</label>
|
|
|
|
<div>
|
|
|
|
<input type="text" name="name" placeholder='{{ form.user.email }}' disabled />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
<label for="id_new_password1" class="">{{ _('Password') }}</label>
|
|
|
|
<div class="">
|
2016-08-16 19:25:18 +02:00
|
|
|
<input id="id_new_password1" class="required" type="password" name="new_password1"
|
|
|
|
value="{% if form.new_password1.value() %}{{ form.new_password1.value() }}{% endif %}"
|
|
|
|
maxlength="100" />
|
|
|
|
{% if form.new_password1.errors %}
|
|
|
|
{% for error in form.new_password1.errors %}
|
|
|
|
<div class="alert alert-error">{{ error }}</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2012-11-05 19:53:16 +01:00
|
|
|
</div>
|
2016-08-16 19:28:02 +02:00
|
|
|
<div class="input-group">
|
|
|
|
<label class="">{{ _('Password strength') }}</label>
|
|
|
|
<div class="">
|
2016-08-16 19:25:18 +02:00
|
|
|
<div class="progress" id="pw_strength">
|
|
|
|
<div class="bar bar-danger" style="width: 10%;"></div>
|
|
|
|
</div>
|
2013-04-08 21:24:44 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-08-16 19:28:02 +02:00
|
|
|
<div class="input-group">
|
|
|
|
<label for="id_new_password2" class="">{{ _('Confirm password') }}</label>
|
|
|
|
<div class="">
|
2016-08-16 19:25:18 +02:00
|
|
|
<input id="id_new_password2" class="required" type="password" name="new_password2"
|
|
|
|
value="{% if form.new_password2.value() %}{{ form.new_password2.value() }}{% endif %}"
|
|
|
|
maxlength="100" />
|
|
|
|
{% if form.new_password2.errors %}
|
|
|
|
{% for error in form.new_password2.errors %}
|
|
|
|
<div class="alert alert-error">{{ error }}</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2012-11-05 19:53:16 +01:00
|
|
|
</div>
|
|
|
|
|
2016-08-16 19:28:02 +02:00
|
|
|
<div class="input-group m-t-30">
|
|
|
|
<div class="centered-button">
|
|
|
|
<input type="submit" class="btn btn-primary" value="Submit" />
|
2016-08-16 19:25:18 +02:00
|
|
|
</div>
|
2012-11-05 19:53:16 +01:00
|
|
|
</div>
|
2016-08-16 19:25:18 +02:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
autofocus('#id_new_password1');
|
|
|
|
</script>
|
|
|
|
{% else %}
|
2016-10-13 13:16:07 +02:00
|
|
|
<p>{{ _('Sorry, the link you provided is invalid or has already been used.') }}</p>
|
2016-08-16 19:25:18 +02:00
|
|
|
{% endif %}
|
2016-08-16 19:28:02 +02:00
|
|
|
</div>
|
2016-08-16 19:25:18 +02:00
|
|
|
</div>
|
2012-11-05 19:53:16 +01:00
|
|
|
|
|
|
|
{% endblock %}
|