1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
Files
netbox-community-netbox/netbox/templates/login.html

65 lines
1.9 KiB
HTML

{% extends 'base.html' %} {% load static %} {% block layout %}
<main class="login-container text-center">
{% if settings.BANNER_LOGIN %}
<div class="alert alert-secondary" role="alert">
{{ settings.BANNER_LOGIN|safe }}
</div>
{% endif %}
<div class="form-login">
<form action="{% url 'login' %}" method="post">
<div class="mb-4">
{% include 'logo.html' with height=80 %}
</div>
{% csrf_token %} {% if 'next' in request.GET %}
<input type="hidden" name="next" value="{{ request.GET.next }}" />
{% endif %} {% if 'next' in request.POST %}
<input type="hidden" name="next" value="{{ request.POST.next }}" />
{% endif %}
<input
required
type="text"
placeholder="Username"
name="username"
maxlength="150"
id="id_username"
class="form-control"
/>
<input
required
type="password"
placeholder="Password"
name="password"
id="id_password"
class="form-control"
/>
<button type="submit" class="btn btn-primary btn-lg w-100 mt-4">
Sign In
</button>
</form>
</div>
{% load form_helpers %} {% if form.non_field_errors %}
<div class="alert alert-danger" role="alert">
<h4 class="alert-heading">Errors</h4>
<p>
{{ form.non_field_errors }}
</p>
</div>
{% endif %}
</main>
<footer class="footer container-fluid login-footer py-3">
<div class="row align-items-center">
<div class="col-2 col-md-1 mb-0">
<button type="button" class="btn btn-sm color-mode-toggle" title="Toggle Color Mode">
<i class="color-mode-icon mdi mdi-lightbulb"></i>&nbsp;
</button>
</div>
<div class="col-1 col-md-auto mb-0"></div>
<div class="col text-end mb-0">
<small class="text-muted">
{{ settings.HOSTNAME }} (v{{ settings.VERSION }})
</small>
</div>
</div>
</footer>
{% endblock %}