{% extends "_layouts/message" %}
{% import "_includes/forms" as forms %}

{% if newUser %}
    {% set title = "Set Your Password"|t('app') %}
{% else %}
    {% set title = "Set Your New Password"|t('app') %}
{% endif %}

{% block message %}


    <form method="post" accept-charset="UTF-8">
        <input type="hidden" name="code" value="{{ code }}">
        <input type="hidden" name="id" value="{{ id }}">
        {{ csrfInput() }}

        <div>
            {{ forms.passwordField({
                id: 'newPassword',
                label: (newUser ? "Choose a password"|t('app') : "Choose a new password"|t('app')),
                name: 'newPassword',
                autofocus: true,
                errors: (errors is defined ? errors : null)
            }) }}
        </div>

        <div class="buttons">
            <input class="btn submit" type="submit" value="{{ 'Set Password'|t('app') }}">
        </div>
    </form>
{% endblock %}
