forked from CGM_Public/pretix_original
Use more sensible defaults for check-in lists in event series (#3147)
This commit is contained in:
@@ -55,7 +55,12 @@ class CheckinList(LoggedModel):
|
|||||||
all_products = models.BooleanField(default=True, verbose_name=_("All products (including newly created ones)"))
|
all_products = models.BooleanField(default=True, verbose_name=_("All products (including newly created ones)"))
|
||||||
limit_products = models.ManyToManyField('Item', verbose_name=_("Limit to products"), blank=True)
|
limit_products = models.ManyToManyField('Item', verbose_name=_("Limit to products"), blank=True)
|
||||||
subevent = models.ForeignKey('SubEvent', null=True, blank=True,
|
subevent = models.ForeignKey('SubEvent', null=True, blank=True,
|
||||||
verbose_name=pgettext_lazy('subevent', 'Date'), on_delete=models.CASCADE)
|
verbose_name=pgettext_lazy('subevent', 'Date'),
|
||||||
|
on_delete=models.CASCADE,
|
||||||
|
help_text=_('If you choose "all dates", tickets will be considered part of this list '
|
||||||
|
'and valid for check-in regardless of which date they are purchased for. '
|
||||||
|
'You can limit their validity through the advanced check-in rules, '
|
||||||
|
'though.'))
|
||||||
include_pending = models.BooleanField(verbose_name=pgettext_lazy('checkin', 'Include pending orders'),
|
include_pending = models.BooleanField(verbose_name=pgettext_lazy('checkin', 'Include pending orders'),
|
||||||
default=False,
|
default=False,
|
||||||
help_text=_('With this option, people will be able to check in even if the '
|
help_text=_('With this option, people will be able to check in even if the '
|
||||||
|
|||||||
@@ -985,7 +985,7 @@ class Order(LockModel, LoggedModel):
|
|||||||
context: Dict[str, Any]=None, log_entry_type: str='pretix.event.order.email.sent',
|
context: Dict[str, Any]=None, log_entry_type: str='pretix.event.order.email.sent',
|
||||||
user: User=None, headers: dict=None, sender: str=None, invoices: list=None,
|
user: User=None, headers: dict=None, sender: str=None, invoices: list=None,
|
||||||
auth=None, attach_tickets=False, position: 'OrderPosition'=None, auto_email=True,
|
auth=None, attach_tickets=False, position: 'OrderPosition'=None, auto_email=True,
|
||||||
attach_ical=False, attach_cached_files: list=None, attach_other_files: list=None):
|
attach_ical=False, attach_other_files: list=None, attach_cached_files: list=None):
|
||||||
"""
|
"""
|
||||||
Sends an email to the user that placed this order. Basically, this method does two things:
|
Sends an email to the user that placed this order. Basically, this method does two things:
|
||||||
|
|
||||||
|
|||||||
@@ -515,6 +515,16 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{% trans "Check-in lists" %}</legend>
|
<legend>{% trans "Check-in lists" %}</legend>
|
||||||
|
<p class="help-block">
|
||||||
|
{% blocktrans trimmed %}
|
||||||
|
You can choose to either add one or more check-in lists for every date in your series individually,
|
||||||
|
or use just one check-in list for all your dates and limit admission through check-in rules. Which
|
||||||
|
approach is better depends on multiple factors, such as the number of dates in your series. For a
|
||||||
|
series with one or less event date per day, individual lists are usually more helpful. If you
|
||||||
|
use dates to represent many time slots on the same day, or even overlapping time slots, working with
|
||||||
|
just one large check-in list will be easier.
|
||||||
|
{% endblocktrans %}
|
||||||
|
</p>
|
||||||
<div class="formset" data-formset data-formset-prefix="{{ cl_formset.prefix }}">
|
<div class="formset" data-formset data-formset-prefix="{{ cl_formset.prefix }}">
|
||||||
{{ cl_formset.management_form }}
|
{{ cl_formset.management_form }}
|
||||||
{% bootstrap_formset_errors cl_formset %}
|
{% bootstrap_formset_errors cl_formset %}
|
||||||
|
|||||||
@@ -157,6 +157,16 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{% trans "Check-in lists" %}</legend>
|
<legend>{% trans "Check-in lists" %}</legend>
|
||||||
|
<p class="help-block">
|
||||||
|
{% blocktrans trimmed %}
|
||||||
|
You can choose to either add one or more check-in lists for every date in your series individually,
|
||||||
|
or use just one check-in list for all your dates and limit admission through check-in rules. Which
|
||||||
|
approach is better depends on multiple factors, such as the number of dates in your series. For a
|
||||||
|
series with one or less event date per day, individual lists are usually more helpful. If you
|
||||||
|
use dates to represent many time slots on the same day, or even overlapping time slots, working with
|
||||||
|
just one large check-in list will be easier.
|
||||||
|
{% endblocktrans %}
|
||||||
|
</p>
|
||||||
<div class="formset" data-formset data-formset-prefix="{{ cl_formset.prefix }}">
|
<div class="formset" data-formset data-formset-prefix="{{ cl_formset.prefix }}">
|
||||||
{{ cl_formset.management_form }}
|
{{ cl_formset.management_form }}
|
||||||
{% bootstrap_formset_errors cl_formset %}
|
{% bootstrap_formset_errors cl_formset %}
|
||||||
|
|||||||
@@ -306,10 +306,11 @@ class EventWizard(SafeSessionWizardView):
|
|||||||
event.set_active_plugins(settings.PRETIX_PLUGINS_DEFAULT.split(","),
|
event.set_active_plugins(settings.PRETIX_PLUGINS_DEFAULT.split(","),
|
||||||
allow_restricted=settings.PRETIX_PLUGINS_DEFAULT.split(","))
|
allow_restricted=settings.PRETIX_PLUGINS_DEFAULT.split(","))
|
||||||
event.save(update_fields=['plugins'])
|
event.save(update_fields=['plugins'])
|
||||||
event.checkin_lists.create(
|
if not event.has_subevents:
|
||||||
name=_('Default'),
|
event.checkin_lists.create(
|
||||||
all_products=True
|
name=_('Default'),
|
||||||
)
|
all_products=True
|
||||||
|
)
|
||||||
event.set_defaults()
|
event.set_defaults()
|
||||||
|
|
||||||
if basics_data['tax_rate']:
|
if basics_data['tax_rate']:
|
||||||
|
|||||||
@@ -251,7 +251,9 @@ class SubEventEditorMixin(MetaDataEditorMixin):
|
|||||||
'include_pending': False,
|
'include_pending': False,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
extra = 0
|
|
||||||
|
if not self.request.event.checkin_lists.filter(subevent__isnull=True).exists():
|
||||||
|
extra = 1
|
||||||
|
|
||||||
formsetclass = inlineformset_factory(
|
formsetclass = inlineformset_factory(
|
||||||
SubEvent, CheckinList,
|
SubEvent, CheckinList,
|
||||||
|
|||||||
Reference in New Issue
Block a user