From 6a820442f5714f3fee8e48e23cf2dd2c16d575a4 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Sat, 3 Aug 2024 21:31:10 +1200 Subject: [PATCH] handle user names with mixed upper and lower case letters. fixes #272 --- app/auth/routes.py | 2 +- app/templates/admin/users.html | 20 ++++++++++---------- app/templates/base.html | 2 +- app/templates/user/_user_nav.html | 2 +- app/templates/user/filters.html | 2 +- app/templates/user/notifications.html | 2 +- app/templates/user/show_profile.html | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/auth/routes.py b/app/auth/routes.py index 73075105..2d52a683 100644 --- a/app/auth/routes.py +++ b/app/auth/routes.py @@ -136,7 +136,7 @@ def register(): application = UserRegistration(user_id=user.id, answer=form.question.data) db.session.add(application) for admin in Site.admins(): - notify = Notification(title='New registration', url='/admin/approve_registrations', user_id=admin.id, + notify = Notification(title='New registration', url=f'/admin/approve_registrations?account={user.id}', user_id=admin.id, author_id=user.id) admin.unread_notifications += 1 db.session.add(notify) diff --git a/app/templates/admin/users.html b/app/templates/admin/users.html index e962a224..12bfbc99 100644 --- a/app/templates/admin/users.html +++ b/app/templates/admin/users.html @@ -19,16 +19,16 @@ - - - - - - - - - - + + + + + + + + + + {% for user in users.items %} diff --git a/app/templates/base.html b/app/templates/base.html index ab6ccd10..aa13c8e1 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -204,7 +204,7 @@ {% for user in blocked_users %} - + {% endfor %} diff --git a/app/templates/user/notifications.html b/app/templates/user/notifications.html index a6596542..4cf28aa8 100644 --- a/app/templates/user/notifications.html +++ b/app/templates/user/notifications.html @@ -51,7 +51,7 @@
{{ _('Settings') }} diff --git a/app/templates/user/show_profile.html b/app/templates/user/show_profile.html index c1b3984c..a3d9dbbe 100644 --- a/app/templates/user/show_profile.html +++ b/app/templates/user/show_profile.html @@ -154,7 +154,7 @@
NameLocal/RemoteSeenAttitudeRepBannedReportsIPSourceActions{{ _('Name') }}{{ _('Local/Remote') }}{{ _('Seen') }}{{ _('Attitude') }}{{ _('Reputation') }}{{ _('Banned') }}{{ _('Reports') }}{{ _('IP and country code') }}{{ _('Source') }}{{ _('Actions') }}
{{ user.display_name() }}{{ user.display_name() }} {{ _('Unblock') }}