misuzu/templates/auth/password_reset.twig
flashwave 383e2ed0e0 Rewrote the user information class.
This one took multiple days and it pretty invasive into the core of Misuzu so issue might (will) arise, there's also some features that have gone temporarily missing in the mean time and some inefficiencies introduced that will be fixed again at a later time.
The old class isn't gone entirely because I still have to figure out what I'm gonna do about validation, but for the most part this knocks out one of the "layers of backwards compatibility", as I've been referring to it, and is moving us closer to a future where Flashii actually gets real updates.
If you run into anything that's broken and you're inhibited from reporting it through the forum, do it through chat or mail me at flashii-issues@flash.moe.
2023-08-02 22:12:47 +00:00

66 lines
2.7 KiB
Twig

{% extends 'auth/master.twig' %}
{% from 'macros.twig' import container_title %}
{% from '_layout/input.twig' import input_hidden, input_csrf, input_text %}
{% set title = 'Resetting password' %}
{% block content %}
<form class="container auth__container auth__password" method="post" action="{{ url('auth-reset') }}">
{{ container_title('<i class="fas fa-user-lock fa-fw"></i> Resetting password for ' ~ password_user.name) }}
{{ input_hidden('reset[user]', password_user.id) }}
{{ input_csrf() }}
{% if password_notices|length > 0 %}
<div class="warning auth__warning">
<div class="warning__content">
{% for notice in password_notices %}
<p class="auth__warning__paragraph">{{ notice }}</p>
{% endfor %}
</div>
</div>
{% else %}
<div class="warning auth__warning auth__warning--welcome">
<div class="warning__content">
<p class="auth__warning__paragraph">A verification code should've been sent to your e-mail address.</p>
</div>
</div>
{% endif %}
{% if password_verification|length == 12 %}
{{ input_hidden('reset[verification]', password_verification) }}
{% else %}
<label class="auth__label">
<div class="auth__label__text">
Verification Code
</div>
<div class="auth__label__value">
{{ input_text('reset[verification]', 'input__text--monospace auth__label__input', '', 'text', '', true, {'maxlength':12}, 1) }}
</div>
</label>
{% endif %}
<label class="auth__label">
<div class="auth__label__text">
New Password
</div>
<div class="auth__label__value">
{{ input_text('reset[password][new]', 'auth__label__input', '', 'password', '', true, null, 2) }}
</div>
</label>
<label class="auth__label">
<div class="auth__label__text">
Confirm Password
</div>
<div class="auth__label__value">
{{ input_text('reset[password][confirm]', 'auth__label__input', '', 'password', '', true, null, 3) }}
</div>
</label>
<div class="auth__buttons">
<button class="input__button auth__buttons__button" tabindex="4">Change Password</button>
<a href="{{ url('auth-login') }}" class="input__button auth__buttons__button auth__buttons__button--minor" tabindex="5">Log in</a>
</div>
</div>
{% endblock %}