Files
snikket-web-portal/snikket_web/templates/user_passwd.html
Jonas Schäfer fa700bba07 Massive code cleanup
- Avoid fighting import cycles using a factory function
- Collapse useless subpackages into simple modules
- Move flask plugins / infrastructure in own module
- Refactor how blueprints are used to localize information about
  URL routing to app factory
2021-01-17 20:11:25 +01:00

44 lines
1.7 KiB
HTML

{% extends "app.html" %}
{% block head_lead %}
<title>Snikket Web Portal</title>
{% endblock %}
{% block content %}
<div class="form layout-expanded"><form method="POST">
<h2 class="form-title">{% trans %}Change your password{% endtrans %}</h2>
<p class="form-desc weak">{% trans %}To change your password, you need to provide the current password as well as the new one. To reduce the chance of typos, we ask for your new password twice.{% endtrans %}</p>
{{ form.csrf_token }}
{% if form.errors %}
<div class="box alert">
<header>{% trans %}Password change failed{% endtrans %}</header>
<ul>
{% for field, errors in form.errors.items() %}
{% for error in errors %}
<li>{{ error }}</li>
{% endfor %}
{% endfor %}
</ul>
</div>
{% endif %}
<div class="f-ebox">
{{ form.current_password.label(class="required") }}
{{ form.current_password(class=("has-error" if form.current_password.name in form.errors else "")) }}
</div>
<div class="f-ebox">
{{ form.new_password.label(class="required") }}
{{ form.new_password }}
</div>
<div class="f-ebox">
{{ form.new_password_confirm.label(class="required") }}
{{ form.new_password_confirm(class=("has-error" if form.new_password_confirm.name in form.errors else "")) }}
</div>
<div class="box warning">
<header>{% trans %}Warning{% endtrans %}</header>
<p>{% trans %}After changing your password, you will have to enter the new password on all of your devices.{% endtrans %}</p>
</div>
<div class="f-bbox">
<a href="{{ url_for('.index') }}" class="button secondary">{% trans %}Back{% endtrans %}</a>
<button type="submit" class="primary">{% trans %}Change password{% endtrans %}</button>
</div>
</form></div>
{% endblock %}