Archived
37 lines
2.4 KiB
HTML
37 lines
2.4 KiB
HTML
{% extends "auth_base.html" %}
|
|
{% block auth_content %}
|
|
<section class="auth-card">
|
|
<div class="auth-card-head">
|
|
<img class="brand-mark auth-mark brand-logo" src="{{ branding.logo or (base_path ~ '/static/img/wgtools-logo.png?v=' ~ version ~ '&r=' ~ asset_rev) }}" alt="">
|
|
<div>
|
|
<h1>{{ tr('auth.reset_title') }}</h1>
|
|
<p>{{ tr('auth.reset_subtitle') }}</p>
|
|
</div>
|
|
</div>
|
|
{% if password_recovery_available %}
|
|
<form id="password-reset-request-form" class="auth-form">
|
|
<label><span>{{ tr('auth.reset_identifier') }}</span><input id="reset-identifier" autocomplete="username" maxlength="254" required autofocus><small>{{ tr('auth.reset_identifier_help') }}</small></label>
|
|
<div id="auth-error" class="operation-status error" hidden></div>
|
|
<button type="submit" class="btn primary auth-submit">{{ tr('auth.send_reset_code') }}</button>
|
|
<div class="auth-secondary-row"><a href="{{ base_path }}/login">{{ tr('auth.back_to_login') }}</a></div>
|
|
</form>
|
|
<form id="password-reset-confirm-form" class="auth-form" hidden>
|
|
<input id="reset-confirm-identifier" type="hidden">
|
|
<div class="inline-note success-note auth-reset-note">{{ tr('auth.reset_code_sent_generic') }}</div>
|
|
<label><span>{{ tr('auth.reset_code') }}</span><input id="reset-code" inputmode="numeric" pattern="[0-9]{6}" minlength="6" maxlength="6" autocomplete="one-time-code" required></label>
|
|
<label><span>{{ tr('settings.new_password') }}</span><input id="reset-password" type="password" minlength="8" maxlength="256" autocomplete="new-password" required></label>
|
|
<label><span>{{ tr('auth.password_repeat') }}</span><input id="reset-password-repeat" type="password" minlength="8" maxlength="256" autocomplete="new-password" required></label>
|
|
<div id="reset-confirm-status" class="operation-status" hidden></div>
|
|
<button type="submit" class="btn primary auth-submit">{{ tr('auth.set_new_password') }}</button>
|
|
<button type="button" class="btn auth-submit" id="reset-request-again">{{ tr('auth.request_another_code') }}</button>
|
|
<div class="auth-secondary-row"><a href="{{ base_path }}/login">{{ tr('auth.back_to_login') }}</a></div>
|
|
</form>
|
|
{% else %}
|
|
<div class="auth-form">
|
|
<div class="inline-note">{{ tr('auth.reset_not_configured') }}</div>
|
|
<div class="auth-secondary-row"><a href="{{ base_path }}/login">{{ tr('auth.back_to_login') }}</a></div>
|
|
</div>
|
|
{% endif %}
|
|
</section>
|
|
{% endblock %}
|