{% 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 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">
                <p class="login-box-msg">{{ 'reset_password'|_ }}</p>

                <form action="{{ url('/password/reset') }}" method="post">
                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                    <input type="hidden" name="token" value="{{ token }}">

                    <div class="input-group mb-3">
                        <input type="email" name="email" class="form-control" value="{{ old('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="input-group mb-3">
                        <input type="password" class="form-control" placeholder="{{ trans('form.password') }}" name="password"/>
                        <div class="input-group-append">
                            <div class="input-group-text">
                                <span class="fas fa-lock"></span>
                            </div>
                        </div>
                    </div>
                    <div class="input-group mb-3">
                        <input type="password" class="form-control" placeholder="{{ trans('form.password_confirmation') }}" name="password_confirmation"/>
                        <div class="input-group-append">
                            <div class="input-group-text">
                                <span class="fas fa-lock"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-12">
                            <div class="icheck-primary">
                                <input type="checkbox" id="verify_password" checked name="verify_password" value="1">
                                <label for="verify_password">
                                    {{ trans('form.verify_password') }}
                                    <a data-toggle="modal" data-target="#passwordModal" href="#passwordModal"><span
                                                class="fa fa-fw fa-question-circle"></span></a>
                                </label>

                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-6 offset-6">
                            <button type="submit" class="btn btn-primary btn-block">{{ 'button_reset_password'|_ }}</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 %}
            </div>
            <!-- /.login-card-body -->
        </div>
    </div>
    <!-- /.login-box -->
    {% include 'partials.password-modal' %}
{% endblock %}
