{#
/**
 * Copyright © 2003-2024 The Galette Team
 *
 * This file is part of Galette (https://galette.eu).
 *
 * Galette is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Galette is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Galette. If not, see <http://www.gnu.org/licenses/>.
 */
#}
{% extends 'public_page.html.twig' %}

{% set body_class = "front_page" %}

{% block content %}
        <form action="{{ url_for('do-password-recovery') }}" method="post" enctype="multipart/form-data" class="ui form">
            <div class="ui segment">
                <div class="field" id="mdp_adh_field">
                    <div class="ui left icon input">
                        <i class="lock icon" aria-hidden="true"></i><label for="mdp_adh" class="visually-hidden">{{ _T('New password:') }}</label>
                        <input type="password" name="mdp_adh" id="mdp_adh" value="" required="required" autofocus placeholder="{{ _T('New password:') }}"/>
                    </div>
                </div>
                <div class="field">
                    <div class="ui left icon input">
                        <i class="lock icon" aria-hidden="true"></i><label for="mdp_adh2" class="visually-hidden">{{ _T('Confirmation:') }}</label>
                        <input type="password" name="mdp_adh2" id="mdp_adh2" value="" required="required" placeholder="{{ _T('Confirmation:') }}"/>
                    </div>
                </div>
                <input type="submit" name="change_passwd" value="{{ _T('Change my password') }}" class="ui fluid large primary submit button"/>
                <input type="hidden" name="hash" value="{{ hash }}"/>
                {% include "components/forms/csrf.html.twig" %}
            </div>
        </form>
{% endblock %}

{% block javascripts %}
<script type="text/javascript">
    $(function() {
        {% include "elements/js/pwdcheck.js.twig" with {
            selector: '#mdp_adh',
            loader: 'inline mini'
        } %}
    });
</script>
{% endblock %}