Update web/templates/login.html
This commit is contained in:
parent
166835c2a9
commit
31d6e1b6b0
@ -7,50 +7,86 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" href="{% static 'app.css' %}">
|
||||
</head>
|
||||
|
||||
<body class="login-page">
|
||||
|
||||
<div class="login-hero">
|
||||
<div class="login-card">
|
||||
|
||||
<h1 class="login-title">Sign in</h1>
|
||||
|
||||
<!-- Preferred sign-in -->
|
||||
<div class="login-sso">
|
||||
<a class="login-sso-button" href="{% url 'oidc_authentication_init' %}">
|
||||
Sign in with SSO
|
||||
Sign in with your account
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="login-divider"><span>or</span></div>
|
||||
<!-- Toggle for legacy login -->
|
||||
<div class="login-divider">
|
||||
<span>
|
||||
<a href="#"
|
||||
onclick="event.preventDefault(); document.getElementById('alt-login').toggleAttribute('hidden');">
|
||||
Use a different sign-in method
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Legacy login (hidden by default) -->
|
||||
<div id="alt-login" hidden>
|
||||
|
||||
{% if form.non_field_errors %}
|
||||
<div class="login-alert">
|
||||
{% for e in form.non_field_errors %}{{ e }}{% if not forloop.last %}<br>{% endif %}{% endfor %}
|
||||
{% for e in form.non_field_errors %}
|
||||
{{ e }}{% if not forloop.last %}<br>{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" action="{% url 'login' %}" novalidate>
|
||||
{% csrf_token %}
|
||||
{% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}
|
||||
{% if next %}
|
||||
<input type="hidden" name="next" value="{{ next }}">
|
||||
{% endif %}
|
||||
|
||||
<label for="id_username" class="login-label">Username</label>
|
||||
<input id="id_username" name="username" type="text" autocomplete="username"
|
||||
value="{{ form.username.value|default:'' }}" required autofocus class="login-input">
|
||||
<input id="id_username"
|
||||
name="username"
|
||||
type="text"
|
||||
autocomplete="username"
|
||||
value="{{ form.username.value|default:'' }}"
|
||||
class="login-input">
|
||||
|
||||
{% if form.username.errors %}
|
||||
<div class="login-field-error">
|
||||
{% for e in form.username.errors %}{{ e }}{% if not forloop.last %}<br>{% endif %}{% endfor %}
|
||||
{% for e in form.username.errors %}
|
||||
{{ e }}{% if not forloop.last %}<br>{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<label for="id_password" class="login-label">Password</label>
|
||||
<input id="id_password" name="password" type="password" autocomplete="current-password"
|
||||
required class="login-input">
|
||||
<input id="id_password"
|
||||
name="password"
|
||||
type="password"
|
||||
autocomplete="current-password"
|
||||
class="login-input">
|
||||
|
||||
{% if form.password.errors %}
|
||||
<div class="login-field-error">
|
||||
{% for e in form.password.errors %}{{ e }}{% if not forloop.last %}<br>{% endif %}{% endfor %}
|
||||
{% for e in form.password.errors %}
|
||||
{{ e }}{% if not forloop.last %}<br>{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<button class="btn btn-primary btn-lg login-submit" type="submit">Sign in</button>
|
||||
<button class="btn btn-primary btn-lg login-submit" type="submit">
|
||||
Sign in
|
||||
</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user