diff --git a/app/t_roles/route.py b/app/t_roles/route.py index bf0a315..8a0c69c 100644 --- a/app/t_roles/route.py +++ b/app/t_roles/route.py @@ -8,6 +8,7 @@ flash, current_app, ) +import re from pypnusershub import routes as fnauth from pypnusershub.db.models import check_and_encrypt_password @@ -291,6 +292,9 @@ def buildUserFullName(user): fullname.append(user["prenom_role"].title()) return " ".join(fullname) +@route.app_template_filter() +def pretty_json_key(key): + return re.sub("([a-z])([A-Z])","\g<1> \g<2>",key) def pops(form, with_group=True): """ diff --git a/app/templates/info_user.html b/app/templates/info_user.html index eb1f317..aa5dfa9 100644 --- a/app/templates/info_user.html +++ b/app/templates/info_user.html @@ -6,6 +6,7 @@ {%set is_organisme = organisme is not none and organisme['nom_organisme'] != '' %} {%set is_desc = user['desc_role'] is not none and user['desc_role'] != '' %} {%set is_remarques = user['remarques'] is not none and user['remarques'] != '' %} +{%set is_champs_addi = user['champs_addi'] is not none and user['champs_addi'] != '' %} {%set is_mail = user['email'] is not none and user['email'] != '' %} {%set is_group = groups|length > 0 %} {%set is_list = lists|length > 0 %} @@ -32,6 +33,31 @@