{% extends "./layout/v3/session" %}
{% block content %}
    <div class="register-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 register-card-body">
                <p class="login-box-msg">{{ 'register_new_account'|_ }}</p>

                <form action="{{ route('register') }}" method="post">
                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                    <input type="hidden" name="invite_code" value="{{ inviteCode }}">
                    <div class="input-group mb-3">
                        <input type="email" name="email" value="{{ email }}" class="form-control"
                               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" autocomplete="new-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" autocomplete="new-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-4 offset-8">
                            <button type="submit" class="btn btn-primary btn-block">Register</button>
                        </div>
                    </div>
                </form>

                <p class="mb-1">
                    <a href="{{ route('login') }}">{{ 'want_to_login'|_ }}</a>
                </p>
                <p class="mb-0">
                    <a href="{{ route('password.reset.request') }}">{{ 'forgot_my_password'|_ }}</a>
                </p>
            </div>
            <!-- /.form-box -->
        </div><!-- /.card -->
    </div>
    <!-- /.register-box -->


    {% include 'partials.password-modal' %}

{% endblock %}
