mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Confirmation step: Improve display of long boolean contact form questions
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -146,10 +146,21 @@
|
||||
</dl>
|
||||
{% endif %}
|
||||
{% for l, v in contact_info %}
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{{ l }}</dt>
|
||||
<dd>{{ v }}</dd>
|
||||
</dl>
|
||||
{% if v is False %}
|
||||
{# do not show #}
|
||||
{% elif v is True %}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" class="checkbox" checked disabled>
|
||||
{{ l }}
|
||||
</label>
|
||||
</div>
|
||||
{% else %}
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{{ l }}</dt>
|
||||
<dd>{{ v }}</dd>
|
||||
</dl>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user