From 818a4291f9576c1ce37d72d77f5dd178a5964305 Mon Sep 17 00:00:00 2001
From: Daniel Grams
Date: Sun, 7 Jun 2020 15:00:09 +0200
Subject: [PATCH] layout
---
templates/_macros.html | 28 +++++++++++++++++++
templates/_messages.html | 9 ++++++
templates/layout.html | 8 ++++--
templates/security/change_password.html | 4 +--
templates/security/forgot_password.html | 6 ++--
templates/security/login_user.html | 8 +++---
templates/security/register_user.html | 8 +++---
templates/security/reset_password.html | 6 ++--
templates/security/send_confirmation.html | 6 ++--
templates/security/send_login.html | 6 ++--
templates/security/two_factor_setup.html | 6 ++--
.../security/two_factor_verify_code.html | 6 ++--
.../security/two_factor_verify_password.html | 4 +--
templates/security/us_setup.html | 4 +--
templates/security/us_signin.html | 6 ++--
templates/security/us_verify.html | 6 ++--
templates/security/verify.html | 4 +--
17 files changed, 82 insertions(+), 43 deletions(-)
create mode 100644 templates/_macros.html
create mode 100644 templates/_messages.html
diff --git a/templates/_macros.html b/templates/_macros.html
new file mode 100644
index 0000000..f3111f1
--- /dev/null
+++ b/templates/_macros.html
@@ -0,0 +1,28 @@
+{% macro render_field_with_errors(field) %}
+
+ {{ field.label }} {{ field(**kwargs)|safe }}
+ {% if field.errors %}
+
+ {% for error in field.errors %}
+ - {{ error }}
+ {% endfor %}
+
+ {% endif %}
+
+{% endmacro %}
+
+{% macro render_field(field) %}
+
@@ -71,6 +70,9 @@
{%- endblock navbar %}
+
+ {% include "_messages.html" %}
+
{% block content -%}
{%- endblock content %}
diff --git a/templates/security/change_password.html b/templates/security/change_password.html
index ee32e1f..ff4a008 100644
--- a/templates/security/change_password.html
+++ b/templates/security/change_password.html
@@ -1,8 +1,8 @@
{% extends "layout.html" %}
-{% from "security/_macros.html" import render_field_with_errors, render_field %}
+{% from "_macros.html" import render_field_with_errors, render_field %}
{% block content %}
-{% include "security/_messages.html" %}
+
{{ _('Change password') }}
-{% include "security/_menu.html" %}
+
{% endblock %}
diff --git a/templates/security/login_user.html b/templates/security/login_user.html
index 2c17b33..d688b5c 100644
--- a/templates/security/login_user.html
+++ b/templates/security/login_user.html
@@ -1,9 +1,9 @@
{% extends "layout.html" %}
-{% from "security/_macros.html" import render_field_with_errors, render_field, render_field_errors %}
+{% from "_macros.html" import render_field_with_errors, render_field, render_field_errors %}
{% block content %}
-{% include "security/_messages.html" %}
-
{{ _('Login') }}
+
+
Anmelden
-{% include "security/_menu.html" %}
+
{% endblock %}
diff --git a/templates/security/register_user.html b/templates/security/register_user.html
index 7a5304a..4e2841f 100644
--- a/templates/security/register_user.html
+++ b/templates/security/register_user.html
@@ -1,9 +1,9 @@
{% extends "layout.html" %}
-{% from "security/_macros.html" import render_field_with_errors, render_field %}
+{% from "_macros.html" import render_field_with_errors, render_field %}
{% block content %}
-{% include "security/_messages.html" %}
-
{{ _('Register') }}
+
+
Registrieren
-{% include "security/_menu.html" %}
+
{% endblock %}
diff --git a/templates/security/reset_password.html b/templates/security/reset_password.html
index 498a62b..40fcf41 100644
--- a/templates/security/reset_password.html
+++ b/templates/security/reset_password.html
@@ -1,8 +1,8 @@
{% extends "layout.html" %}
-{% from "security/_macros.html" import render_field_with_errors, render_field %}
+{% from "_macros.html" import render_field_with_errors, render_field %}
{% block content %}
-{% include "security/_messages.html" %}
+
{{ _('Reset password') }}
-{% include "security/_menu.html" %}
+
{% endblock %}
diff --git a/templates/security/send_confirmation.html b/templates/security/send_confirmation.html
index 799783a..83d1de7 100644
--- a/templates/security/send_confirmation.html
+++ b/templates/security/send_confirmation.html
@@ -1,13 +1,13 @@
{% extends "layout.html" %}
-{% from "security/_macros.html" import render_field_with_errors, render_field %}
+{% from "_macros.html" import render_field_with_errors, render_field %}
{% block content %}
-{% include "security/_messages.html" %}
+
{{ _('Resend confirmation instructions') }}
-{% include "security/_menu.html" %}
+
{% endblock %}
diff --git a/templates/security/send_login.html b/templates/security/send_login.html
index 2f97115..d3b274c 100644
--- a/templates/security/send_login.html
+++ b/templates/security/send_login.html
@@ -1,13 +1,13 @@
{% extends "layout.html" %}
-{% from "security/_macros.html" import render_field_with_errors, render_field %}
+{% from "_macros.html" import render_field_with_errors, render_field %}
{% block content %}
-{% include "security/_messages.html" %}
+
{{ _('Login') }}
-{% include "security/_menu.html" %}
+
{% endblock %}
diff --git a/templates/security/two_factor_setup.html b/templates/security/two_factor_setup.html
index d5dee84..77a6672 100644
--- a/templates/security/two_factor_setup.html
+++ b/templates/security/two_factor_setup.html
@@ -1,8 +1,8 @@
{% extends "layout.html" %}
-{% from "security/_macros.html" import render_field_with_errors, render_field, render_field_no_label, render_field_errors %}
+{% from "_macros.html" import render_field_with_errors, render_field, render_field_no_label, render_field_errors %}
{% block content %}
- {% include "security/_messages.html" %}
+
{{ _("Two-factor authentication adds an extra layer of security to your account") }}
{{ _("In addition to your username and password, you'll need to use a code that we will send you") }}
- {% include "security/_menu.html" %}
+
{% endblock %}
diff --git a/templates/security/two_factor_verify_code.html b/templates/security/two_factor_verify_code.html
index f2c2b1f..96c1f3e 100644
--- a/templates/security/two_factor_verify_code.html
+++ b/templates/security/two_factor_verify_code.html
@@ -1,8 +1,8 @@
{% extends "layout.html" %}
-{% from "security/_macros.html" import render_field_with_errors, render_field %}
+{% from "_macros.html" import render_field_with_errors, render_field %}
{% block content %}
- {% include "security/_messages.html" %}
+
{{ _("Two-factor Authentication") }}
{{ _("Please enter your authentication code") }}
- {% include "security/_menu.html" %}
+
{% endblock %}
diff --git a/templates/security/us_verify.html b/templates/security/us_verify.html
index b61a0d5..8b38853 100644
--- a/templates/security/us_verify.html
+++ b/templates/security/us_verify.html
@@ -1,8 +1,8 @@
{% extends "layout.html" %}
-{% from "security/_macros.html" import render_field_with_errors, render_field, render_field_errors %}
+{% from "_macros.html" import render_field_with_errors, render_field, render_field_errors %}
{% block content %}
- {% include "security/_messages.html" %}
+
{{ _("Please re-authenticate") }}
- {% include "security/_menu.html" %}
+
{% endblock %}
diff --git a/templates/security/verify.html b/templates/security/verify.html
index 5313956..a1859a1 100644
--- a/templates/security/verify.html
+++ b/templates/security/verify.html
@@ -1,8 +1,8 @@
{% extends "layout.html" %}
-{% from "security/_macros.html" import render_field_with_errors, render_field %}
+{% from "_macros.html" import render_field_with_errors, render_field %}
{% block content %}
- {% include "security/_messages.html" %}
+
{{ _("Please Enter Your Password") }}