From 94e8d34948aec19bf47ca41cad8392230ef5e2f1 Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Thu, 16 Dec 2021 16:10:01 -0800 Subject: [PATCH] fix(routers.accounts): use target user's account type for autofill Signed-off-by: Kevin Morris --- aurweb/routers/accounts.py | 2 +- templates/partials/account_form.html | 2 +- test/test_accounts_routes.py | 77 +++++++++++++++++++++++++--- 3 files changed, 72 insertions(+), 9 deletions(-) diff --git a/aurweb/routers/accounts.py b/aurweb/routers/accounts.py index 8eecaa31..86dd993e 100644 --- a/aurweb/routers/accounts.py +++ b/aurweb/routers/accounts.py @@ -170,7 +170,7 @@ def make_account_form_context(context: dict, context = copy.copy(context) context["account_types"] = [ - (at.USER_ID, "Normal User"), + (at.USER_ID, f"Normal {at.USER}"), (at.TRUSTED_USER_ID, at.TRUSTED_USER) ] diff --git a/templates/partials/account_form.html b/templates/partials/account_form.html index 1a444582..8ed01ce7 100644 --- a/templates/partials/account_form.html +++ b/templates/partials/account_form.html @@ -51,7 +51,7 @@