From 415e37ab67e830af15df8ae7d3a96d0b6836b71a Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 5 Sep 2024 18:13:04 +0200 Subject: [PATCH] =?UTF-8?q?Table=20utilisateurs:=20affiche=20date=20approx?= =?UTF-8?q?.=20de=20derni=C3=A8re=20connexion=20m=C3=AAme=20si=20pas=20Sup?= =?UTF-8?q?erAdmin.=20Option=20=C3=A9clater=20r=C3=B4les.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_users.py | 109 ++++++++++++++++++++++++++++------------ app/views/users.py | 11 ++-- 2 files changed, 85 insertions(+), 35 deletions(-) diff --git a/app/scodoc/sco_users.py b/app/scodoc/sco_users.py index c4737e4b7..8ae260827 100644 --- a/app/scodoc/sco_users.py +++ b/app/scodoc/sco_users.py @@ -29,6 +29,7 @@ """ # Anciennement ZScoUsers.py, fonctions de gestion des données réécrites avec flask/SQLAlchemy +import datetime import re from flask import url_for, g, render_template, request @@ -47,7 +48,11 @@ from app.scodoc.sco_exceptions import ScoValueError def index_html( - all_depts=False, having_role_name: str = "", with_inactives=False, fmt="html" + all_depts=False, + having_role_name: str = "", + with_inactives=False, + detail_roles=False, + fmt="html", ): "gestion utilisateurs..." all_depts = int(all_depts) @@ -73,14 +78,6 @@ def index_html( """   Pour importer des utilisateurs en masse (via fichier xlsx) contactez votre administrateur scodoc.""" ) - if all_depts: - checked = "checked" - else: - checked = "" - if with_inactives: - olds_checked = "checked" - else: - olds_checked = "" menu_roles = "\n".join( f"""