53 lines
1.8 KiB
HTML
53 lines
1.8 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Sign in · {{ app_name }}{% endblock %}
|
|
{% block body %}
|
|
<div class="auth-shell">
|
|
<div class="card auth-card">
|
|
<h1>{{ app_name }}</h1>
|
|
<p class="muted">Sign in to continue</p>
|
|
|
|
{% if ldap_enabled %}
|
|
|
|
<form method="post" action="/login/ldap">
|
|
{% if ldap_error %}<div class="alert">{{ ldap_error }}</div>{% endif %}
|
|
<label>Username
|
|
<input type="text" name="username" value="{{ username or '' }}" required autofocus>
|
|
</label>
|
|
<label>Password
|
|
<input type="password" name="password" required>
|
|
</label>
|
|
<button type="submit" class="btn btn-primary">Sign in</button>
|
|
</form>
|
|
|
|
<details class="local-login-panel" {% if local_error %}open{% endif %}>
|
|
<summary>Use a local account instead</summary>
|
|
<form method="post" action="/login">
|
|
{% if local_error %}<div class="alert">{{ local_error }}</div>{% endif %}
|
|
<label>Email
|
|
<input type="email" name="email" value="{{ email or '' }}" required>
|
|
</label>
|
|
<label>Password
|
|
<input type="password" name="password" required>
|
|
</label>
|
|
<button type="submit" class="btn btn-primary">Sign in with local account</button>
|
|
</form>
|
|
</details>
|
|
|
|
{% else %}
|
|
|
|
<form method="post" action="/login">
|
|
{% if local_error %}<div class="alert">{{ local_error }}</div>{% endif %}
|
|
<label>Email
|
|
<input type="email" name="email" value="{{ email or '' }}" required autofocus>
|
|
</label>
|
|
<label>Password
|
|
<input type="password" name="password" required>
|
|
</label>
|
|
<button type="submit" class="btn btn-primary">Sign in</button>
|
|
</form>
|
|
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|