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 %} +

+ {% endif %} +

+{% endmacro %} + +{% macro render_field(field) %} +

{{ field(**kwargs)|safe }}

+{% endmacro %} + +{% macro render_field_errors(field) %} +

+ {% if field and field.errors %} +

+ {% endif %} +

+{% endmacro %} diff --git a/templates/_messages.html b/templates/_messages.html new file mode 100644 index 0000000..dabc7b5 --- /dev/null +++ b/templates/_messages.html @@ -0,0 +1,9 @@ +{%- with messages = get_flashed_messages(with_categories=true) -%} + {% if messages %} + + {% endif %} +{%- endwith %} diff --git a/templates/layout.html b/templates/layout.html index c245155..80b57eb 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -45,7 +45,6 @@