From 77dfb2dd619863cf2a18893aa5f3de03b7eaa006 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Tue, 11 Jan 2022 15:21:12 +0100 Subject: correct linebreaks written in python --- server/templates/server/doc_type.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server') diff --git a/server/templates/server/doc_type.html b/server/templates/server/doc_type.html index 8b2131d..4f8fe6f 100644 --- a/server/templates/server/doc_type.html +++ b/server/templates/server/doc_type.html @@ -213,7 +213,7 @@ messageMessaggio aggiuntivo
- {{doctype.custom_message_text}} + {{doctype.custom_message_text | linebreaksbr}}
{% endif %} -- cgit v1.2.1 From 99915b9316036ac8ae13fe8d692080b460c0ad55 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Tue, 11 Jan 2022 15:57:39 +0100 Subject: fix user filter not displaing properly --- server/templates/server/doc_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server') diff --git a/server/templates/server/doc_list.html b/server/templates/server/doc_list.html index 736fdd4..5b898ec 100644 --- a/server/templates/server/doc_list.html +++ b/server/templates/server/doc_list.html @@ -508,7 +508,7 @@ $('#chips_owner').chips({ autocompleteOptions: { data: { {% for user in users %} - '{{user.username}} ({{user.first_name}} {{user.last_name}})': null, + '{{user.user__username}} ({{user.user__first_name}} {{user.user__last_name}})': null, {% endfor %} }, limit: Infinity, -- cgit v1.2.1 From 9f1ae7f9b3fab995748ead2549b77d4d0605521f Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Tue, 11 Jan 2022 16:01:54 +0100 Subject: hide user from data request if not approved --- server/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server') diff --git a/server/views.py b/server/views.py index 0e032f0..c91db1e 100644 --- a/server/views.py +++ b/server/views.py @@ -1472,11 +1472,13 @@ def data_request(request): if "request" not in request.POST.keys(): context["error"] = "Selezionare una richesta" elif request.POST["request"] == "email_all": - users_email = User.objects.filter(groups__name=parent_group).values_list("email", flat=True) + perm = Permission.objects.get(codename="approved") + users_email = User.objects.filter(groups__name=parent_group, user_permissions=perm).values_list("email", flat=True) data = ", ".join(users_email) context["data"] = data elif request.POST["request"] == "email_non_staff": - users_email = User.objects.filter(groups__name=parent_group).exclude(groups__name="capi").values_list("email", flat=True) + perm = Permission.objects.get(codename="approved") + users_email = User.objects.filter(groups__name=parent_group, user_permission=perm).exclude(groups__name="capi").values_list("email", flat=True) data = ", ".join(users_email) context["data"] = data elif request.POST["request"] == "data_user": -- cgit v1.2.1