From 7afa15bff1eead376e56cc959c3152b06d2dc40a Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Fri, 15 Jan 2021 19:39:05 +0100 Subject: [PATCH 1/5] fix: Subtable alternating color in subscription list --- cotisations/templates/cotisations/aff_cotisations.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cotisations/templates/cotisations/aff_cotisations.html b/cotisations/templates/cotisations/aff_cotisations.html index e48a6e2b..05be4861 100644 --- a/cotisations/templates/cotisations/aff_cotisations.html +++ b/cotisations/templates/cotisations/aff_cotisations.html @@ -60,7 +60,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {{ facture.user }} - +
{% for article in facture.name_detailed %} - - - - - - {% endfor %} -
From 42ded799e4c55ca7d6ad46ca56ef694f79a539d1 Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Fri, 15 Jan 2021 19:40:04 +0100 Subject: [PATCH 2/5] fix: Whitelist and ticket list responsiveness --- tickets/templates/tickets/aff_tickets.html | 2 +- users/templates/users/aff_whitelists.html | 79 +++++++++++----------- 2 files changed, 41 insertions(+), 40 deletions(-) diff --git a/tickets/templates/tickets/aff_tickets.html b/tickets/templates/tickets/aff_tickets.html index beaadc4f..caf82cf3 100644 --- a/tickets/templates/tickets/aff_tickets.html +++ b/tickets/templates/tickets/aff_tickets.html @@ -46,7 +46,7 @@ with this program; if not, write to the Free Software Foundation, Inc., -
+
diff --git a/users/templates/users/aff_whitelists.html b/users/templates/users/aff_whitelists.html index fdfd0b76..40d55d28 100644 --- a/users/templates/users/aff_whitelists.html +++ b/users/templates/users/aff_whitelists.html @@ -30,43 +30,44 @@ with this program; if not, write to the Free Software Foundation, Inc., {% load acl %} {% load logs_extra %} -
- - - {% trans "User" as tr_user %} - - - {% trans "Start date" as tr_start %} - - {% trans "End date" as tr_end %} - - - - - {% for whitelist in white_list %} - {% if whitelist.is_active %} - - {% else %} - +
+
{% include 'buttons/sort.html' with prefix='white' col="user" text=tr_user %}{% trans "Reason" %}{% include 'buttons/sort.html' with prefix='white' col="start" text=tr_start %}{% include 'buttons/sort.html' with prefix='white' col="end" text=tr_end %}
+ + + {% trans "User" as tr_user %} + + + {% trans "Start date" as tr_start %} + + {% trans "End date" as tr_end %} + + + + + {% for whitelist in white_list %} + {% if whitelist.is_active %} + + {% else %} + + {% endif %} + + + + + + + {% endfor %} +
{% include 'buttons/sort.html' with prefix='white' col="user" text=tr_user %}{% trans "Reason" %}{% include 'buttons/sort.html' with prefix='white' col="start" text=tr_start %}{% include 'buttons/sort.html' with prefix='white' col="end" text=tr_end %}
{{ whitelist.user }}{{ whitelist.raison }}{{ whitelist.date_start }}{{ whitelist.date_end }} + {% can_delete whitelist %} + {% include 'buttons/suppr.html' with href='users:del-whitelist' id=whitelist.id %} + {% acl_end %} + {% history_button whitelist %} + {% can_edit whitelist %} + {% include 'buttons/edit.html' with href='users:edit-whitelist' id=whitelist.id %} + {% acl_end %} +
+ + {% if white_list.paginator %} + {% include 'pagination.html' with list=white_list %} {% endif %} -
{{ whitelist.user }}{{ whitelist.raison }}{{ whitelist.date_start }}{{ whitelist.date_end }} - {% can_delete whitelist %} - {% include 'buttons/suppr.html' with href='users:del-whitelist' id=whitelist.id %} - {% acl_end %} - {% history_button whitelist %} - {% can_edit whitelist %} - {% include 'buttons/edit.html' with href='users:edit-whitelist' id=whitelist.id %} - {% acl_end %} -
- -{% if white_list.paginator %} - {% include 'pagination.html' with list=white_list %} -{% endif %} - + From 3d748e9e42ea95bbb8defae3ffc133536cfdfb6e Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Fri, 15 Jan 2021 19:51:11 +0100 Subject: [PATCH 3/5] fix: Use bootstrap class for fa-check and fa-times color instead of hardcoded value --- cotisations/templates/cotisations/aff_cost_estimate.html | 4 ++-- re2o/templatetags/design.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cotisations/templates/cotisations/aff_cost_estimate.html b/cotisations/templates/cotisations/aff_cost_estimate.html index fe654744..269dc6af 100644 --- a/cotisations/templates/cotisations/aff_cost_estimate.html +++ b/cotisations/templates/cotisations/aff_cost_estimate.html @@ -73,9 +73,9 @@ with this program; if not, write to the Free Software Foundation, Inc., {{ estimate.id }} {% if estimate.final_invoice %} - + {% else %} - + {% endif %} diff --git a/re2o/templatetags/design.py b/re2o/templatetags/design.py index 488b1489..45739133 100644 --- a/re2o/templatetags/design.py +++ b/re2o/templatetags/design.py @@ -31,9 +31,9 @@ def tick(valeur, autoescape=False): if isinstance(valeur, bool): if valeur == True: - result = '' + result = '' else: - result = '' + result = '' return mark_safe(result) else: # if the value is not a boolean, display it as if tick was not called From 8ed26a2415600f5aff9eb063fef8db6f61b78bad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Pi=C3=A9tri?= Date: Wed, 13 Jan 2021 15:31:29 +0100 Subject: [PATCH 4/5] fix: :bug: Fix voucher_pdf function (#315) Replace date_end by date_end_memb in voucher_pdf. Close #315 --- cotisations/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cotisations/views.py b/cotisations/views.py index 35fdc82a..e114b569 100644 --- a/cotisations/views.py +++ b/cotisations/views.py @@ -1057,7 +1057,7 @@ def voucher_pdf(request, invoice, **_kwargs): "lastname": invoice.user.surname, "email": invoice.user.email, "phone": invoice.user.telephone, - "date_end": invoice.get_subscription().latest("date_end").date_end, + "date_end": invoice.get_subscription().latest("date_end_memb").date_end_memb, "date_begin": invoice.date, }, ) From 5c409c20c29177b9c284e8b680bd156d3901a981 Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Fri, 15 Jan 2021 18:55:46 +0100 Subject: [PATCH 5/5] fix: Potential information leak in serviceuser history --- logs/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logs/models.py b/logs/models.py index aa5d7822..51b250f3 100644 --- a/logs/models.py +++ b/logs/models.py @@ -360,7 +360,7 @@ class HistoryEvent: return value - def edits(self, hide=[]): + def edits(self, hide=["password", "pwd_ntlm"]): """Get the list of the changes performed during this event. Args: