{% extends '@Login/loginLayout.twig' %}

{% set pageTitle %}{{ 'Login_PasswordResetCancelConfirmTitle'|translate }}{% endset %}

{% block loginContent %}
    <div class="contentForm loginForm confirmPasswordForm">
        {% embed 'contentBlock.twig' with {'title': ('Login_PasswordResetCancelConfirm'|translate)} %}
            {% block content %}
                {% if errorMessage is empty %}
                    <p>{{ 'Login_PasswordResetCancelConfirmDescription'|translate }}</p>
                    <br>
                    <form action="{{ linkTo({'module': loginPlugin, 'action': 'cancelResetPassword', 'login': login, 'resetToken': resetToken}) }}" method="post">
                        <div class="row actions">
                            <div class="col s12">
                                <input type="hidden" name="nonce" value="{{ nonce }}"/>
                                <input class="submit btn" id='confirm-cancel-reset-password' type="submit" value="{{ 'General_Confirm'|translate }}"
                                       tabindex="100"/>
                            </div>
                        </div>
                    </form>
                {% else %}
                    <div class="message_container">
                        <div vue-entry="CoreHome.Notification"
                             noclear="true"
                             context="error">
                                {{ 'Login_PasswordResetCancelTokenIssue'|translate }}
                        </div>
                    </div>
                    <div class="row actions">
                        <div class="col s12">
                            <a href="{{ linkTo({'module': loginPlugin, 'action': 'login'}) }}" class="btn submit">{{ 'Login_LogIn'|translate }}</a>
                        </div>
                    </div>
                {% endif %}
            {% endblock %}
        {% endembed %}
    </div>

{% endblock %}