{#
/**
 * 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 form_url %}{{ url_for('dologin') }}{% endblock %}

{% block content %}
                <form action="{{ block('form_url') }}" method="post" class="ui form">
    {% if preferences.pref_mail_method != constant('\\Galette\\Core\\GaletteMail::METHOD_DISABLED') %}
                    <div class="ui segments">
    {% endif %}
                        <div class="ui segment">
                            <div class="field">
                                <div class="ui left icon input">
                                    <i class="user icon" aria-hidden="true"></i><label for="login" class="visually-hidden">{{ _T("Username:") }}</label>
                                    <input type="text" name="login" id="login" autofocus placeholder="{{ _T("Username:") }}"/>
                                </div>
                            </div>
                            <div class="field">
                                <div class="ui left icon input">
                                    <i class="lock icon" aria-hidden="true"></i><label for="password" class="visually-hidden">{{ _T("Password:") }}</label>
                                    <input type="password" name="password" id="password" placeholder="{{ _T("Password:") }}"/>
                                </div>
                            </div>
                            <input type="submit" class="ui fluid large primary submit button" value="{{ _T("Login") }}"/>
                            <input type="hidden" name="ident" value="1" />
                            {% include "components/forms/csrf.html.twig" %}
                        </div>
    {% if preferences.pref_mail_method != constant('\\Galette\\Core\\GaletteMail::METHOD_DISABLED') %}
                        <div class="ui center aligned secondary segment">
                            <a
                                href="{{ url_for('password-lost') }}"
                                class="password-lost"
                            >
                                <i class="icon unlock alt" aria-hidden="true"></i>
                                {{ _T("Lost your password?") }}
                            </a>
                        </div>
                    </div>
    {% endif %}
                </form>
{% endblock %}
