From e3cb57f2e1e9194562688869ac65962181a51b0b Mon Sep 17 00:00:00 2001 From: Serghei Mihai Date: Wed, 24 Oct 2018 12:10:14 +0200 Subject: [PATCH] templates: hide receiver in form's front-office history (#27119) --- wcs/forms/common.py | 3 ++- wcs/templates/wcs/formdata_history.html | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wcs/forms/common.py b/wcs/forms/common.py index 6b5cea4a..2e081e42 100644 --- a/wcs/forms/common.py +++ b/wcs/forms/common.py @@ -273,7 +273,8 @@ class FormStatusPage(Directory, FormTemplateMixin): return template.render( list(self.get_formdef_template_variants(self.history_templates)), - {'formdata': self.filled}) + {'formdata': self.filled, + 'is_in_backoffice': get_request().is_in_backoffice()}) def check_receiver(self): session = get_session() diff --git a/wcs/templates/wcs/formdata_history.html b/wcs/templates/wcs/formdata_history.html index 58f6c594..9c26de8e 100644 --- a/wcs/templates/wcs/formdata_history.html +++ b/wcs/templates/wcs/formdata_history.html @@ -22,10 +22,12 @@ {% endif %}
{% if evolution.who %} + {% if evolution.who == '_submitter' or is_in_backoffice %} {{evolution.get_author_name|default_if_none:""}} {% if evolution.get_author_qualification %}({{evolution.get_author_qualification}}){% endif %} {% endif %} + {% endif %} {% if not evolution.status %} {{evolution.datetime}} {% endif %} -- 2.19.1