{% extends 'layouts/fullscreen.twig' %}


{% block sidebar %}
    {% include 'members/login/sidebar_login_form.twig' %}
{% endblock %}


{% block content %}

<div class="pageWrap">

    <div class="contentPageWrap membersWrap publicMembersArea">

        <div class="resetPasswordWrap">


            {% include 'includes/partials/fullscreen_page_heading.twig' with {
                title: 'Reset password',
                content: 'Enter the email address associated with your account and we will email you details on how to reset your password.'
            }%}

            {% if success is not empty %}
                {{ success.message|raw }}
            {% endif %}

            {% if errors is not empty %}
                <div class="error">
                    <ul>
                        {% for error in errors %}
                            <li class="error-item">{{error}}</li>
                        {% endfor %}
                    </ul>
                </div>
            {% endif %}

            {% if success is empty %}
                <form class="reminder memberFormWrap js_reminder"
                      action="{{ route('members-password-reminder-action', [], false) }}"
                      method="post"
                >


                    <fieldset class="registerYourAddress">

                        <div class="row {% if errors.email %} inputError showError{% endif %}">
                            <label for="passwordEmail">Email address</label>
                            <div class="inputWrap">
                                <input type="email" title="Please enter your email address" name="email" id="passwordEmail" class="text" />
                            </div>
                            {% if errors.email %}
                                <div class="validationMessage">
                                    {{ errors.email }}
                                </div> <!-- .validationMessage -->
                            {% endif %}
                        </div>

                        <input type="hidden" name="action" value="sendpassword" />

                    </fieldset>

                    <div class="fullscreenFormFooter">
                        <a href="{{ route('members-login', {
                            'nhs': is_nhs_login
                        }, false) }}"
                           class="formLink smallScreen"
                        >
                            Back to login form
                        </a>
                        <button type="submit" name="submitfrm" class="button buttonAlt">
                            Reset password
                        </button>
                    </div> <!-- .resetSubmit -->


                </form>
            {% endif %}

        </div> <!-- .resetPasswordWrap -->

	</div> <!-- .contentPageWrap.membersWrap -->

</div> <!-- .pageWrap -->

{% endblock %}
