diff --git a/apps/registration/static/registration/fa-lock.svg b/apps/registration/static/registration/fa-lock.svg new file mode 100644 index 00000000..24b8dc75 --- /dev/null +++ b/apps/registration/static/registration/fa-lock.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/apps/registration/static/registration/fa-user.svg b/apps/registration/static/registration/fa-user.svg new file mode 100644 index 00000000..ac145d32 --- /dev/null +++ b/apps/registration/static/registration/fa-user.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/apps/registration/static/registration/login.css b/apps/registration/static/registration/login.css new file mode 100644 index 00000000..744e8485 --- /dev/null +++ b/apps/registration/static/registration/login.css @@ -0,0 +1,14 @@ +/* +Add icons to login form +Font-Awesome attribution is already done inside SVG files +*/ + +#login-form input[type="text"] { + background: right 1rem top 50% / 5% no-repeat url('fa-user.svg'); + padding-right: 3rem; +} + +#login-form input[type="password"] { + background: right 1rem top 50% / 5% no-repeat url('fa-lock.svg'); + padding-right: 3rem; +} \ No newline at end of file diff --git a/apps/registration/templates/registration/login.html b/apps/registration/templates/registration/login.html index e624631f..7cdec5b3 100644 --- a/apps/registration/templates/registration/login.html +++ b/apps/registration/templates/registration/login.html @@ -2,33 +2,45 @@ {% comment %} SPDX-License-Identifier: GPL-2.0-or-later {% endcomment %} -{% load i18n crispy_forms_tags %} +{% load i18n crispy_forms_tags static %} +{# Change page title without displaying it in header #} {% block title %}{% trans "Log in" %}{% endblock %} -{% block contenttitle %}

{% trans "Log in" %}

{% endblock %} +{% block contenttitle %}{% endblock %} + +{% block extracss %} + +{% endblock %} {% block content %} - {% if user.is_authenticated %} -

- {% blocktrans trimmed with username=request.user.username %} - You are authenticated as {{ username }}, but are not authorized to - access this page. Would you like to login to a different account, - or with a higher permission mask? - {% endblocktrans %} -

- {% endif %} +
+

+ {% trans "Log in" %} +

+
+ {% if user.is_authenticated %} +

+ {% blocktrans trimmed with username=request.user.username %} + You are authenticated as {{ username }}, but are not authorized to + access this page. Would you like to login to a different account, + or with a higher permission mask? + {% endblocktrans %} +

+ {% endif %} - {% if request.resolver_match.view_name == 'admin:login' %} -
- {% blocktrans trimmed %} - You must be logged with a staff account with the higher mask to access Django Admin. - {% endblocktrans %} + {% if request.resolver_match.view_name == 'admin:login' %} +
+ {% blocktrans trimmed %} + You must be logged with a staff account with the higher mask to access Django Admin. + {% endblocktrans %} +
+ {% endif %} + +
{% csrf_token %} + {{ form | crispy }} + + {% trans 'Forgotten your password or username?' %} +
- {% endif %} - -
{% csrf_token %} - {{ form | crispy }} - - {% trans 'Forgotten your password or username?' %} -
+
{% endblock %}