From ecd97fc6ce2c3a135f9b081d2860b7e56ab1a7d2 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Mon, 3 May 2021 10:21:45 +0200 Subject: [PATCH] Confirmation step: Improve display of long boolean contact form questions --- src/pretix/presale/checkoutflow.py | 4 ---- .../pretixpresale/event/checkout_confirm.html | 19 +++++++++++++++---- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/pretix/presale/checkoutflow.py b/src/pretix/presale/checkoutflow.py index cc70b94bc6..c8f0a13c70 100644 --- a/src/pretix/presale/checkoutflow.py +++ b/src/pretix/presale/checkoutflow.py @@ -870,10 +870,6 @@ class ConfirmStep(CartMixin, AsyncAction, TemplateFlowStep): for key, value in response.items(): v = self.cart_session.get('contact_form_data', {}).get(key) v = value.bound_data(v, initial='') - if v is True: - v = _('Yes') - elif v is False: - v = _('No') ctx['contact_info'].append((rich_text_snippet(value.label), v)) return ctx diff --git a/src/pretix/presale/templates/pretixpresale/event/checkout_confirm.html b/src/pretix/presale/templates/pretixpresale/event/checkout_confirm.html index ce6df75ba7..546c83c342 100644 --- a/src/pretix/presale/templates/pretixpresale/event/checkout_confirm.html +++ b/src/pretix/presale/templates/pretixpresale/event/checkout_confirm.html @@ -146,10 +146,21 @@ {% endif %} {% for l, v in contact_info %} -
-
{{ l }}
-
{{ v }}
-
+ {% if v is False %} + {# do not show #} + {% elif v is True %} +
+ +
+ {% else %} +
+
{{ l }}
+
{{ v }}
+
+ {% endif %} {% endfor %}