forked from shaba/openuds
Added custom html info on login page
This commit is contained in:
parent
69c4efe793
commit
4b3c3cc183
@ -268,7 +268,7 @@ class GlobalConfig:
|
||||
# (only if os manager asks for this characteristic)
|
||||
CHECK_UNUSED_TIME: Config.Value = Config.section(GLOBAL_SECTION).value('checkUnusedTime', '631', type=Config.NUMERIC_FIELD) # Defaults to 10 minutes
|
||||
# Default CSS Used
|
||||
CSS: Config.Value = Config.section(GLOBAL_SECTION).value('css', settings.STATIC_URL + 'css/uds.css', type=Config.TEXT_FIELD)
|
||||
# CSS: Config.Value = Config.section(GLOBAL_SECTION).value('css', settings.STATIC_URL + 'css/uds.css', type=Config.TEXT_FIELD)
|
||||
# Max logins before blocking an account
|
||||
MAX_LOGIN_TRIES: Config.Value = Config.section(GLOBAL_SECTION).value('maxLoginTries', '3', type=Config.NUMERIC_FIELD)
|
||||
# Block time in second for an user that makes too many mistakes, 5 minutes default
|
||||
@ -338,6 +338,7 @@ class GlobalConfig:
|
||||
SITE_COPYRIGHT_LINK: Config.Value = Config.section(CUSTOM_SECTION).value('Site copyright link', 'https://www.udsenterprise.com', type=Config.TEXT_FIELD)
|
||||
SITE_LOGO_NAME: Config.Value = Config.section(CUSTOM_SECTION).value('Logo name', 'UDS', type=Config.TEXT_FIELD)
|
||||
SITE_CSS: Config.Value = Config.section(CUSTOM_SECTION).value('CSS', '', type=Config.LONGTEXT_FIELD)
|
||||
SITE_INFO: Config.Value = Config.section(CUSTOM_SECTION).value('Site information', '', type=Config.LONGTEXT_FIELD)
|
||||
|
||||
# Custom HTML for login page
|
||||
# CUSTOM_HTML_LOGIN: Config.Value = Config.section(CUSTOM_SECTION).value('customHtmlLogin', '', type=Config.LONGTEXT_FIELD)
|
||||
@ -376,9 +377,3 @@ class GlobalConfig:
|
||||
|
||||
except Exception:
|
||||
logger.debug('Config table do not exists!!!, maybe we are installing? :-)')
|
||||
|
||||
|
||||
# Context processor
|
||||
# noinspection PyUnusedLocal
|
||||
def context_processor(request):
|
||||
return {'css_path': GlobalConfig.CSS.get()}
|
||||
|
@ -143,9 +143,3 @@ def checkBrowser(request: 'HttpRequest', browser: str) -> bool:
|
||||
return True
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# debug setting in context
|
||||
def context(request: 'HttpRequest'):
|
||||
from django.conf import settings
|
||||
return {'DEBUG': settings.DEBUG}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -38,6 +38,14 @@ from django.utils.translation import ugettext_noop as _
|
||||
from uds.core.ui import gui
|
||||
from uds.core import transports
|
||||
|
||||
# TODO: do this
|
||||
def createADUser():
|
||||
try:
|
||||
from . import AD
|
||||
|
||||
except ImportError:
|
||||
return
|
||||
|
||||
# Not imported at runtime, just for type checking
|
||||
if typing.TYPE_CHECKING:
|
||||
from uds import models
|
||||
|
@ -122,6 +122,7 @@ def udsJs(request: 'HttpRequest') -> str:
|
||||
'site_copyright_info': GlobalConfig.SITE_COPYRIGHT.get(),
|
||||
'site_copyright_link': GlobalConfig.SITE_COPYRIGHT_LINK.get(),
|
||||
'site_logo_name': GlobalConfig.SITE_LOGO_NAME.get(),
|
||||
'site_information': GlobalConfig.SITE_INFO.get(),
|
||||
'messages': {
|
||||
# Calendar denied message
|
||||
'calendarDenied': GlobalConfig.LIMITED_BY_CALENDAR_TEXT.get().strip() or gettext('Access limited by calendar')
|
||||
|
Loading…
x
Reference in New Issue
Block a user