From 8f1e465280f9b3bf43206856ae0ce744925ca35c Mon Sep 17 00:00:00 2001 From: Place Jean-Marie Date: Sat, 30 Oct 2021 12:05:51 +0200 Subject: [PATCH] show current user name while getting old_password --- app/templates/auth/change_password.html | 20 ++++++++++++++------ app/views/users.py | 6 +++++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/app/templates/auth/change_password.html b/app/templates/auth/change_password.html index 975e8bc9..2bec7762 100644 --- a/app/templates/auth/change_password.html +++ b/app/templates/auth/change_password.html @@ -1,9 +1,13 @@ {% extends "base.html" %} {% import 'bootstrap/wtf.html' as wtf %} -{% macro render_field(field) %} +{% macro render_field(field, auth_name=None) %} - {{ field.label }} + {% if auth_name %} + {{ field.label }} ({{ auth_name }}): + {% else %} + {{ field.label }} + {% endif %} {{ field(**kwargs)|safe }} {% if field.errors %}