forked from CGM_Public/pretix_original
Do not auto-create a first subevent
This commit is contained in:
@@ -154,6 +154,7 @@ class EventWizardBasicsForm(I18nModelForm):
|
||||
if self.has_subevents:
|
||||
del self.fields['presale_start']
|
||||
del self.fields['presale_end']
|
||||
del self.fields['date_to']
|
||||
|
||||
if self.has_control_rights(self.user, self.organizer):
|
||||
del self.fields['team']
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
</div>
|
||||
</div>
|
||||
{% bootstrap_field form.date_from layout="control" %}
|
||||
{% bootstrap_field form.date_to layout="control" %}
|
||||
{% if form.date_to %}
|
||||
{% bootstrap_field form.date_to layout="control" %}
|
||||
{% endif %}
|
||||
<div class="geodata-section">
|
||||
{% bootstrap_field form.location layout="control" %}
|
||||
<div class="form-group geodata-group" data-tiles="{{ global_settings.leaflet_tiles|default_if_none:"" }}" data-attrib="{{ global_settings.leaflet_tiles_attribution }}" data-icon="{% static "leaflet/images/marker-icon.png" %}" data-shadow="{% static "leaflet/images/marker-shadow.png" %}">
|
||||
|
||||
@@ -251,19 +251,6 @@ class EventWizard(SafeSessionWizardView):
|
||||
t.members.add(self.request.user)
|
||||
t.limit_events.add(event)
|
||||
|
||||
if event.has_subevents:
|
||||
se = event.subevents.create(
|
||||
name=event.name,
|
||||
date_from=event.date_from,
|
||||
date_to=event.date_to,
|
||||
presale_start=event.presale_start,
|
||||
presale_end=event.presale_end,
|
||||
location=event.location,
|
||||
geo_lat=event.geo_lat,
|
||||
geo_lon=event.geo_lon,
|
||||
active=True
|
||||
)
|
||||
|
||||
logdata = {}
|
||||
for f in form_list:
|
||||
logdata.update({
|
||||
@@ -277,17 +264,10 @@ class EventWizard(SafeSessionWizardView):
|
||||
elif self.clone_from:
|
||||
event.copy_data_from(self.clone_from)
|
||||
else:
|
||||
if event.has_subevents:
|
||||
event.checkin_lists.create(
|
||||
name=str(se),
|
||||
all_products=True,
|
||||
subevent=se
|
||||
)
|
||||
else:
|
||||
event.checkin_lists.create(
|
||||
name=_('Default'),
|
||||
all_products=True
|
||||
)
|
||||
event.checkin_lists.create(
|
||||
name=_('Default'),
|
||||
all_products=True
|
||||
)
|
||||
event.set_defaults()
|
||||
|
||||
if basics_data['tax_rate']:
|
||||
|
||||
Reference in New Issue
Block a user