diff --git a/netbox/templates/login.html b/netbox/templates/login.html index 164cb1176..e66945ceb 100644 --- a/netbox/templates/login.html +++ b/netbox/templates/login.html @@ -1,53 +1,58 @@ -{% extends 'base.html' %} {% load static %} {% block layout %} - - {% if settings.BANNER_LOGIN %} - - {{ settings.BANNER_LOGIN|safe }} - - {% endif %} - - - - {% include 'logo.html' with height=80 %} +{# User login page. Extends base.html directly to override normal UI layout. #} +{% extends 'base.html' %} +{% load form_helpers %} +{% load static %} + +{% block layout %} + + + {# Login banner #} + {% if settings.BANNER_LOGIN %} + + {{ settings.BANNER_LOGIN|safe }} - {% csrf_token %} {% if 'next' in request.GET %} - - {% endif %} {% if 'next' in request.POST %} - - {% endif %} - - - - Sign In - - - - {% load form_helpers %} {% if form.non_field_errors %} - - Errors - - {{ form.non_field_errors }} - - - {% endif %} - - + {% endblock %} diff --git a/netbox/users/forms.py b/netbox/users/forms.py index 495332d2c..8bd54cb66 100644 --- a/netbox/users/forms.py +++ b/netbox/users/forms.py @@ -6,12 +6,7 @@ from .models import Token class LoginForm(BootstrapMixin, AuthenticationForm): - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - - self.fields['username'].widget.attrs['placeholder'] = '' - self.fields['password'].widget.attrs['placeholder'] = '' + pass class PasswordChangeForm(BootstrapMixin, DjangoPasswordChangeForm):
- {{ form.non_field_errors }} -