mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Allow a banner to be displayed on the login and other related pages showing custom text. Fixes #4549
This commit is contained in:
@@ -187,6 +187,13 @@ else:
|
||||
else:
|
||||
DATA_DIR = os.path.realpath(os.path.expanduser(u'~/.pgadmin/'))
|
||||
|
||||
# An optional login banner to show security warnings/disclaimers etc. at
|
||||
# login and password recovery etc. HTML may be included for basic formatting,
|
||||
# For example:
|
||||
# LOGIN_BANNER = "<h4>Authorised Users Only!</h4>" \
|
||||
# "Unauthorised use is strictly forbidden."
|
||||
LOGIN_BANNER = ""
|
||||
|
||||
##########################################################################
|
||||
# Log settings
|
||||
##########################################################################
|
||||
|
||||
@@ -919,6 +919,16 @@ table.table-empty-rows{
|
||||
}
|
||||
}
|
||||
|
||||
.login_banner {
|
||||
position: fixed;
|
||||
width: 80%;
|
||||
top: 50px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
text-align: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.change_pass {
|
||||
background-color: $color-gray-light;
|
||||
height: 100%;
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
{% from "security/fields.html" import render_field_with_errors %}
|
||||
{% block body %}
|
||||
<div class="container-fluid h-100 login_page">
|
||||
{% if config.LOGIN_BANNER is defined and config.LOGIN_BANNER != "" %}
|
||||
<div class="login_banner alert alert-danger" role="alert">
|
||||
{{ config.LOGIN_BANNER|safe }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include "security/messages.html" %}
|
||||
<div class="row h-100 align-items-center justify-content-center">
|
||||
<div class="col-md-6">{% block panel_image %}{% endblock %}</div>
|
||||
|
||||
Reference in New Issue
Block a user