{% extends "./layout/v3/session" %}

{% block content %}
    <div class="login-box">

        <div class="login-logo">
            <img src="v3-local/logo/logo-session.png" width="68" height="100" alt="Firefly III Logo"
                 title="Firefly III"/>
        </div>

        {% if session.status %}
            <div class="alert alert-success">
                {{ session.status }}
            </div>
        {% endif %}

        {% if errors|length > 0 %}
            <div class="alert alert-danger">
                <strong>{{ 'flash_error'|_ }}</strong> {{ 'problems_with_input'|_ }}<br><br>
                <ul>
                    {% for error in errors.all %}
                        <li>{{ error }}</li>
                    {% endfor %}
                </ul>
            </div>
        {% endif %}

        <div class="card">
            <div class="card-body login-card-body">
                {% if session('status') %}
                    <p class="login-box-msg text-success">
                        {{ session('status') }}
                    </p>
                {% else %}
                    <p class="login-box-msg">{{ 'reset_password'|_ }}</p>
                    <form action="{{ route('password.email') }}" method="post">
                        <input type="hidden" name="_token" value="{{ csrf_token() }}"/>
                        <div class="input-group mb-3">
                            <input type="email" class="form-control" name="email"
                                   placeholder="{{ trans('form.email') }}"/>
                            <div class="input-group-append">
                                <div class="input-group-text">
                                    <span class="fas fa-envelope"></span>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-12">
                                <button type="submit" class="btn btn-primary btn-block">{{ 'reset_button'|_ }}</button>
                            </div>
                            <!-- /.col -->
                        </div>
                    </form>

                    <p class="mt-3 mb-1">
                        <a href="{{ route('login') }}">{{ 'want_to_login'|_ }}</a>
                    </p>
                    {% if allowRegistration %}
                        <p class="mb-0">
                            <a href="{{ route('register') }}" class="text-center">{{ 'register_new_account'|_ }}</a>
                        </p>
                    {% endif %}
                {% endif %}
            </div>
        </div>
    </div>
{% endblock %}
