mercury/web/templates/auth/login.tpl
2023-09-04 03:33:13 +02:00

33 lines
940 B
Smarty

{% extends 'base.tpl' %}
{% block title %}
Log in • {{ config.Name }}
{% endblock %}
{% block content %}
<div class="auth">
{% if flash_message %}
<p>{{ flash_message }}</p>
{% endif %}
{% if not totp %}
<form method="post">
<p>
<label for="username">Username</label>
<input type="text" name="username" />
</p>
<p>
<label for="username">Password</label>
<input type="password" name="password" />
</p>
<input type="submit" value="Log in" />
</form>
{% else %}
<form method="post">
<p>
<label for="totp_code">Two-factor authentication code</label>
<input type="text" name="totp_code" />
</p>
<input type="text" name="totp_ticket" value="{{ totp_ticket }}" disabled />
<input type="submit" value="Log in" />
</form>
{% endif %}
</div>
{% endblock %}