Update web/templates/login.html

This commit is contained in:
Joshua Laymon 2026-01-10 00:51:12 +00:00
parent 166835c2a9
commit 31d6e1b6b0

View File

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