- {% if interface.login_title %}
-
- {{ interface.login_title }}
-
- {% else %}
-
- {% trans 'Welcome to the Jumpserver open source fortress' %}
-
- {% endif %}
-
+
+ {{ JMS_TITLE }}
+
{% trans 'Welcome back, please enter username and password to login' %}
diff --git a/apps/authentication/views/login.py b/apps/authentication/views/login.py
index 89d647291..fc2270eba 100644
--- a/apps/authentication/views/login.py
+++ b/apps/authentication/views/login.py
@@ -43,7 +43,7 @@ class UserLoginView(FormView):
key_prefix_captcha = "_LOGIN_INVALID_{}"
def get_template_names(self):
- template_name = 'users/login.html'
+ template_name = 'authentication/login.html'
if not settings.XPACK_ENABLED:
return template_name
@@ -51,7 +51,7 @@ class UserLoginView(FormView):
if not License.has_valid_license():
return template_name
- template_name = 'users/new_login.html'
+ template_name = 'authentication/new_login.html'
return template_name
def get(self, request, *args, **kwargs):
@@ -145,7 +145,7 @@ class UserLoginView(FormView):
class UserLoginOtpView(FormView):
- template_name = 'users/login_otp.html'
+ template_name = 'authentication/login_otp.html'
form_class = forms.UserCheckOtpCodeForm
redirect_field_name = 'next'
diff --git a/apps/jumpserver/context_processor.py b/apps/jumpserver/context_processor.py
index c7a5c34d4..f8967adcf 100644
--- a/apps/jumpserver/context_processor.py
+++ b/apps/jumpserver/context_processor.py
@@ -1,14 +1,18 @@
# -*- coding: utf-8 -*-
#
+from django.contrib.staticfiles.templatetags.staticfiles import static
def jumpserver_processor(request):
- context = {}
-
# Setting default pk
- context.update(
- {'DEFAULT_PK': '00000000-0000-0000-0000-000000000000'}
- )
+ context = {
+ 'DEFAULT_PK': '00000000-0000-0000-0000-000000000000',
+ 'LOGO_URL': static('img/logo.png'),
+ 'LOGO_TEXT_URL': static('img/logo_text.png'),
+ 'LOGIN_IMAGE_URL': static('img/login_image.png'),
+ 'FAVICON_URL': static('img/facio.ico'),
+ 'JMS_TITLE': 'Jumpserver'
+ }
return context
diff --git a/apps/static/img/login/login_image_1.png b/apps/static/img/login_image.png
similarity index 100%
rename from apps/static/img/login/login_image_1.png
rename to apps/static/img/login_image.png
diff --git a/apps/static/img/logo-text.png b/apps/static/img/logo_text.png
similarity index 100%
rename from apps/static/img/logo-text.png
rename to apps/static/img/logo_text.png
diff --git a/apps/templates/_footer.html b/apps/templates/_footer.html
index e9f268b1a..869ea76a6 100644
--- a/apps/templates/_footer.html
+++ b/apps/templates/_footer.html
@@ -1,7 +1,7 @@
{% load i18n %}