diff --git a/src/pretix/base/models/items.py b/src/pretix/base/models/items.py index 2a49e06e11..780af9c732 100644 --- a/src/pretix/base/models/items.py +++ b/src/pretix/base/models/items.py @@ -631,7 +631,7 @@ class Item(LoggedModel): null=True, blank=True, max_length=16, verbose_name=_('Validity'), help_text=_( - 'When setting up a regular event, or an event series with time slots, you typically to NOT need to change ' + 'When setting up a regular event, or an event series with time slots, you typically do NOT need to change ' 'this value. The default setting means that the validity time of tickets will not be decided by the ' 'product, but by the event and check-in configuration. Only use the other options if you need them to ' 'realize e.g. a booking of a year-long ticket with a dynamic start date. Note that the validity will be ' diff --git a/src/pretix/control/forms/item.py b/src/pretix/control/forms/item.py index 2c8169a283..72c7c1afbc 100644 --- a/src/pretix/control/forms/item.py +++ b/src/pretix/control/forms/item.py @@ -614,6 +614,15 @@ class ItemUpdateForm(I18nModelForm): self.fields['free_price_suggestion'].widget.attrs['data-display-dependency'] = '#id_free_price' + self.fields['validity_dynamic_start_choice'] = forms.TypedChoiceField( + label=_("Start of validity"), + choices=( + ("False", _("Purchase date")), + ("True", _("Date chosen by customer")), + ), + coerce=lambda x: x == 'True', + ) + qs = self.event.organizer.membership_types.all() if qs: self.fields['require_membership_types'].queryset = qs diff --git a/src/pretix/control/templates/pretixcontrol/item/index.html b/src/pretix/control/templates/pretixcontrol/item/index.html index 55778b817c..0ce0c034ec 100644 --- a/src/pretix/control/templates/pretixcontrol/item/index.html +++ b/src/pretix/control/templates/pretixcontrol/item/index.html @@ -209,6 +209,7 @@ {% bootstrap_field form.validity_fixed_until layout="control" %}
+ {% bootstrap_field form.validity_dynamic_start_choice layout="control" %}
@@ -231,8 +232,7 @@
- {% bootstrap_field form.validity_dynamic_start_choice layout="control" %} -
+
{% trans "days" as t_days %} {% bootstrap_field form.validity_dynamic_start_choice_day_limit addon_after=t_days layout="control" %}