misuzu/templates/auth/auth.twig

66 lines
2.6 KiB
Twig

{% extends 'auth/master.twig' %}
{% from 'auth/macros.twig' import auth_login %}
{% block content %}
{{ auth_login(
auth_username|default(''),
auth_register_message|default(auth_login_error|default('')),
auth_register_message is defined
) }}
{% if not prevent_registration %}
<form class="container container--new auth" method="post" action="">
<input type="hidden" name="auth[mode]" value="register">
<div class="container__title">Register</div>
{% if auth_register_error is defined %}
<div class="warning auth__warning">
<div class="warning__content">
{{ auth_register_error }}
</div>
</div>
{% endif %}
<div class="auth__form">
<input class="input__text input__text--new auth__input" type="text"
name="auth[username]" placeholder="Username"
value="{{ auth_username|default('') }}" required>
<input class="input__text input__text--new auth__input" type="password"
name="auth[password]" placeholder="Password" required>
<input class="input__text input__text--new auth__input" type="text"
name="auth[email]" placeholder="E-mail"
value="{{ auth_email|default('') }}" required>
<input class="input__text input__text--new auth__input" type="text"
name="auth[meow]" placeholder="What is the outcome of nine plus ten?" required>
<button class="input__button input__button--new">Sign up</button>
</div>
</form>
{% endif %}
{% if not prevent_password_reset %}
<form class="container container--new auth" method="post" action="">
<input type="hidden" name="auth[mode]" value="forgot">
<div class="container__title">Forgot password</div>
{% if auth_forgot_error is defined %}
<div class="warning auth__warning">
<div class="warning__content">
{{ auth_forgot_error }}
</div>
</div>
{% endif %}
<div class="auth__form">
<input class="input__text input__text--new auth__input" type="text"
name="auth[email]" placeholder="E-mail"
value="{{ auth_email|default('') }}" required>
<button class="input__button input__button--new">Send reminder</button>
</div>
</form>
{% endif %}
{% endblock %}