-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
account: password forgotten template
* Modifies the template for resetting password. * Closes #102. Co-Authored-by: Sébastien Délèze <sebastien.deleze@rero.ch>
- Loading branch information
Sébastien Délèze
committed
Jan 28, 2020
1 parent
aa90dd5
commit 89da967
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{# -*- coding: utf-8 -*- | ||
|
||
This file is part of Invenio. | ||
Copyright (C) 2015-2018 CERN. | ||
|
||
Invenio is free software; you can redistribute it and/or modify it | ||
under the terms of the MIT License; see LICENSE file for more details. | ||
#} | ||
|
||
{%- extends config.ACCOUNTS_COVER_TEMPLATE %} | ||
|
||
{% from "invenio_accounts/_macros.html" import render_field, form_errors %} | ||
{%- set messages = get_flashed_messages(with_categories=true) -%} | ||
|
||
{% block panel %} | ||
{%- with form = reset_password_form %} | ||
<div class="col-lg-6"> | ||
<div class="card card-light text-dark"> | ||
<div class="card-body p-3 p-lg-5"> | ||
<h4 class="text-center mb-4">{{_('Reset Password')}}</h3> | ||
{%- if messages %} | ||
{%- for category, message in messages %} | ||
<p>{{ message }}</p> | ||
{%- endfor %} | ||
{%- else %} | ||
<form action="{{ url_for_security('reset_password', token=reset_password_token) }}" method="POST" name="reset_password_form"> | ||
{{ form.hidden_tag() }} | ||
{{ render_field(reset_password_form.password, autofocus=True) }} | ||
{{ render_field(reset_password_form.password_confirm) }} | ||
<button type="submit" class="btn btn-secondary btn-lg btn-block text-light">{{_('Reset Password')}}</button> | ||
</form> | ||
{%- endif %} | ||
</div> | ||
</div> | ||
{%- if current_user.is_anonymous %} | ||
<div class="mt-2 text-right"> | ||
<a href="{{url_for('security.login')}}" class="text-light mr-3">{{_('Log In')}}</a> | ||
{%- if security.registerable %} | ||
<a href="{{url_for('security.register')}}" class="text-light">{{_('Sign Up')}}</a> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
</div> | ||
{%- endwith %} | ||
{% endblock panel %} |