Making login screen a bit clearer
This commit is contained in:
1 parent
1180694738
commit
0150c19b75
3 files changed
+83
-26
No files matched your search
+43
-23
@@ -2,31 +2,51 @@
|
||||
{% block title %}Sign in · {{ app_name }}{% endblock %}
|
||||
{% block body %}
|
||||
<div class="auth-shell">
|
||||
<form class="card auth-card" method="post" action="/login">
|
||||
<div class="card auth-card">
|
||||
<h1>{{ app_name }}</h1>
|
||||
<p class="muted">Sign in to continue</p>
|
||||
{% if error %}<div class="alert">{{ 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>
|
||||
|
||||
{% if ldap_enabled %}
|
||||
<form class="card auth-card" method="post" action="/login/ldap">
|
||||
<h2>Sign in with LDAP</h2>
|
||||
<p class="muted">Use your directory username and password</p>
|
||||
<label>Username
|
||||
<input type="text" name="username" value="{{ username or '' }}" required>
|
||||
</label>
|
||||
<label>Password
|
||||
<input type="password" name="password" required>
|
||||
</label>
|
||||
<button type="submit" class="btn btn-primary">Sign in with LDAP</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% 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 %}
|
||||
Reference in new issue
Block a user