mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Code tidy.
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
{% block panel_title %}{{ _('%(appname)s Password Change', appname=config.APP_NAME) }}{% endblock %}
|
||||
{% block panel_body %}
|
||||
<form action="{{ url_for_security('change_password') }}" method="POST" name="change_password_form">
|
||||
{{ change_password_form.hidden_tag() }}
|
||||
<fieldset>
|
||||
{{ render_field_with_errors(change_password_form.password, "password") }}
|
||||
{{ 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-lg btn-success btn-block" type="submit" value="{{ _('Change Password') }}">
|
||||
</fieldset>
|
||||
{{ change_password_form.hidden_tag() }}
|
||||
<fieldset>
|
||||
{{ render_field_with_errors(change_password_form.password, "password") }}
|
||||
{{ 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-lg btn-success btn-block" type="submit" value="{{ _('Change Password') }}">
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{% macro render_field_with_errors(field, type) %}
|
||||
<div class="form-group{% if field.errors %} has-error{% endif %}">
|
||||
<input class="form-control" placeholder="{{ field.label.text }}" name="{{ field.name }}" type="{% if type %}{{ type }}{% else %}{{ field.type }}{% endif %}">
|
||||
<input class="form-control" placeholder="{{ field.label.text }}" name="{{ field.name }}"
|
||||
type="{% if type %}{{ type }}{% else %}{{ field.type }}{% endif %}">
|
||||
</div>
|
||||
{% if field.errors %}
|
||||
{% for error in field.errors %}
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
{% block panel_title %}{{ _('Recover %(appname)s Password', appname=config.APP_NAME) }}{% endblock %}
|
||||
{% block panel_body %}
|
||||
<p>{{ _('Enter the email address for the user account you wish to recover the password for:') }}</p>
|
||||
<form action="{{ url_for_security('forgot_password') }}" method="POST" name="forgot_password_form">
|
||||
<form action="{{ url_for_security('forgot_password') }}" method="POST" name="forgot_password_form">
|
||||
{{ forgot_password_form.hidden_tag() }}
|
||||
<fieldset>
|
||||
{{ render_field_with_errors(forgot_password_form.email, "text") }}
|
||||
<input class="btn btn-lg btn-success btn-block" type="submit" value="{{ _('Recover Password') }}">
|
||||
</fieldset>
|
||||
{{ render_field_with_errors(forgot_password_form.email, "text") }}
|
||||
<input class="btn btn-lg btn-success btn-block" type="submit" value="{{ _('Recover Password') }}">
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
{% block panel_title %}{{ _('%(appname)s Login', appname=config.APP_NAME) }}{% endblock %}
|
||||
{% block panel_body %}
|
||||
<form action="{{ url_for_security('login') }}" method="POST" name="login_user_form">
|
||||
{{ login_user_form.hidden_tag() }}
|
||||
<fieldset>
|
||||
{{ render_field_with_errors(login_user_form.email, "text") }}
|
||||
{{ render_field_with_errors(login_user_form.password, "password") }}
|
||||
<input class="btn btn-lg btn-success btn-block" type="submit" value="{{ _('Login') }}">
|
||||
</fieldset>
|
||||
{{ login_user_form.hidden_tag() }}
|
||||
<fieldset>
|
||||
{{ render_field_with_errors(login_user_form.email, "text") }}
|
||||
{{ render_field_with_errors(login_user_form.password, "password") }}
|
||||
<input class="btn btn-lg btn-success btn-block" type="submit" value="{{ _('Login') }}">
|
||||
</fieldset>
|
||||
</form>
|
||||
<span class="help-block">{{ _('Forgotten your <a href="%(url)s">password</a>?', url=url_for('security.forgot_password')) }}</span>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{%- with messages = get_flashed_messages(with_categories=true) -%}
|
||||
{% if messages %}
|
||||
<div style="position: fixed; top: 20px; right: 20px; width: 400px; z-index: 9999">
|
||||
{% for category, message in messages %}
|
||||
<div class="alert alert-{{ category }} alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ _('Close') }}"><span aria-hidden="true">×</span></button>
|
||||
{% if messages %}
|
||||
<div style="position: fixed; top: 20px; right: 20px; width: 400px; z-index: 9999">
|
||||
{% for category, message in messages %}
|
||||
<div class="alert alert-{{ category }} alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ _('Close') }}"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{%- endwith %}
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
{% from "security/fields.html" import render_field_with_errors %}
|
||||
{% block body %}
|
||||
<div class="container">
|
||||
{% include "security/messages.html" %}
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{% block panel_title %}{% endblock %}</h3>
|
||||
{% include "security/messages.html" %}
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{% block panel_title %}{% endblock %}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% block panel_body %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% block panel_body %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'security/watermark.html' %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{% extends "security/panel.html" %}
|
||||
{% block panel_title %}{{ _('%(appname)s Password Reset', appname=config.APP_NAME) }}{% endblock %}
|
||||
{% block panel_body %}
|
||||
<form action="{{ url_for_security('reset_password', token=reset_password_token) }}" method="POST" name="reset_password_form">
|
||||
{{ reset_password_form.hidden_tag() }}
|
||||
<fieldset>
|
||||
{{ render_field_with_errors(reset_password_form.password, "password") }}
|
||||
{{ render_field_with_errors(reset_password_form.password_confirm, "password") }}
|
||||
<input class="btn btn-lg btn-success btn-block" type="submit" value="{{ _('Reset Password') }}">
|
||||
</fieldset>
|
||||
<form action="{{ url_for_security('reset_password', token=reset_password_token) }}" method="POST"
|
||||
name="reset_password_form">
|
||||
{{ reset_password_form.hidden_tag() }}
|
||||
<fieldset>
|
||||
{{ render_field_with_errors(reset_password_form.password, "password") }}
|
||||
{{ render_field_with_errors(reset_password_form.password_confirm, "password") }}
|
||||
<input class="btn btn-lg btn-success btn-block" type="submit" value="{{ _('Reset Password') }}">
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user