mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Checkout: Hide empty add-on forms and show seat above add-on form
This commit is contained in:
committed by
GitHub
parent
bd32b33ba9
commit
c59d29493c
@@ -514,7 +514,6 @@ class AddOnsStep(CartMixin, AsyncAction, TemplateFlowStep):
|
||||
'variation': cartpos.variation,
|
||||
'categories': []
|
||||
}
|
||||
formset.append(formsetentry)
|
||||
|
||||
current_addon_products = defaultdict(list)
|
||||
for a in cartpos.addons.all():
|
||||
@@ -592,6 +591,8 @@ class AddOnsStep(CartMixin, AsyncAction, TemplateFlowStep):
|
||||
'iao': iao,
|
||||
'items': items
|
||||
})
|
||||
if formsetentry['categories']:
|
||||
formset.append(formsetentry)
|
||||
return formset
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
</summary>
|
||||
<div id="cp{{ form.pos.pk }}">
|
||||
<div class="panel-body">
|
||||
{% if form.pos.seat %}
|
||||
<p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="16" height="14" viewBox="2 0 16 14"><path d="M7.713 3.573c-.787-.124-1.677.472-1.511 1.529l.857 3.473c.116.579.578 1.086 1.317 1.086h3.166v3.504c0 1.108 1.556 1.113 1.556.019V8.682c0-.536-.376-1.116-1.099-1.116L9.52 7.563l-.752-2.936c-.147-.648-.583-.981-1.055-1.055v.001Z"/><path d="M4.48 5.835a.6.6 0 0 0-.674.725l.71 3.441c.287 1.284 1.39 2.114 2.495 2.114h2.273c.807 0 .811-1.215-.01-1.215H7.188c-.753 0-1.375-.45-1.563-1.289l-.672-3.293c-.062-.3-.26-.452-.474-.483ZM7.433.102a1.468 1.468 0 1 0 0 2.937 1.469 1.469 0 1 0 0-2.937Z"/></svg>{{ form.pos.seat }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if form.pos.subevent %}
|
||||
<p>
|
||||
<span class="fa fa-calendar" aria-hidden="true"></span>
|
||||
|
||||
Reference in New Issue
Block a user