mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Added support for Two-factor authentication for improving security. Fixes #6543
This commit is contained in:
committed by
Akshay Joshi
parent
c4db223a64
commit
787a441343
@@ -32,6 +32,7 @@
|
||||
window.resourceBasePath = "{{ url_for('static', filename='js') }}/generated/";
|
||||
</script>
|
||||
<!-- Base template scripts -->
|
||||
{% if requirejs is defined and requirejs is true %}
|
||||
<script type="application/javascript"
|
||||
src="{{ url_for('static', filename='vendor/require/require.js' if config.DEBUG else 'vendor/require/require.min.js') }}"></script>
|
||||
<script type="application/javascript">
|
||||
@@ -57,11 +58,13 @@
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{% endif %}
|
||||
{% if basejs is defined and basejs is true %}
|
||||
<!-- View specified scripts -->
|
||||
<script type="application/javascript" src="{{ url_for('static', filename='js/generated/vendor.main.js') }}" ></script>
|
||||
<script type="application/javascript" src="{{ url_for('static', filename='js/generated/vendor.others.js') }}" ></script>
|
||||
<script type="application/javascript" src="{{ url_for('static', filename='js/generated/pgadmin_commons.js') }}" ></script>
|
||||
{% endif %}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
@@ -73,7 +76,6 @@
|
||||
{% block body %}{% endblock %}
|
||||
<script type="application/javascript">
|
||||
{% block init_script %}{% endblock %}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "security/fields.html" import render_field_with_errors %}
|
||||
{% block body %}
|
||||
<div class="container-fluid change_pass">
|
||||
<div class="container-fluid change_pass auth_page">
|
||||
{% include "security/messages.html" %}
|
||||
<div class="row align-items-center h-100">
|
||||
<div class="col-md-4"></div>
|
||||
@@ -18,7 +18,7 @@
|
||||
{{ render_field_with_errors(change_password_form.new_password, "password") }}
|
||||
{{ render_field_with_errors(change_password_form.new_password_confirm, "password") }}
|
||||
<input class="btn btn-primary btn-block btn-change-pass" type="submit" value="{{ _('Change Password') }}"
|
||||
title="{{ _('Change Password') }}">
|
||||
title="{{ _('Change Password') }}" aria-label="{{ _('Change Password') }}>
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{% from "security/fields.html" import render_field_with_errors, render_username_with_errors %}
|
||||
{% block title %}{{ config.APP_NAME }}{% endblock %}
|
||||
{% block body %}
|
||||
<div class="container-fluid h-100 login_page">
|
||||
<div class="container-fluid h-100 login_page{% if auth_page is defined and auth_page is true %} auth_page{% endif %}">
|
||||
{% if config.LOGIN_BANNER is defined and config.LOGIN_BANNER != "" %}
|
||||
<div class="login_banner alert alert-danger" role="alert">
|
||||
{{ config.LOGIN_BANNER|safe }}
|
||||
@@ -10,13 +10,22 @@
|
||||
{% 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>
|
||||
<div class="col-md-3">
|
||||
<div class="panel-header text-color h4"><i class="app-icon pg-icon" aria-hidden="true"></i> {{ _('%(appname)s', appname=config.APP_NAME) }}</div>
|
||||
<div class="panel-body">
|
||||
<div class="d-block text-color pb-3 h5">{% block panel_title %}{% endblock %}</div>
|
||||
{% block panel_body %}
|
||||
{% endblock %}
|
||||
<div class="d-none d-md-block col-md-6">{% block panel_image %}{% endblock %}</div>
|
||||
<div class="col-md-3 panel-container mh-100">
|
||||
<div class="panel-header h4 pt-2 pb-1 m-0 rounded-top">
|
||||
<span class="d-flex justify-content-center pgadmin_header_logo"
|
||||
onclick="return false;"
|
||||
href="#"
|
||||
title="{{ _('%(appname)s', appname=config.APP_NAME) }}"
|
||||
aria-label="{{ _('%(appname)s', appname=config.APP_NAME) }} logo">
|
||||
<i class="app-icon pg-icon"
|
||||
aria-hidden="true"
|
||||
style="width: auto; background-size: auto; min-width: 100px;"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="panel-body p-3 overflow-auto" style="max-height: calc(100vh - 3em);">
|
||||
<div class="d-block text-color pb-2 h4 text-center">{% block panel_title %}{% endblock %}</div>
|
||||
{% block panel_body %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user