forked from CGM_Public/pretix_original
Allow to copy across events with and w/o subevents
This commit is contained in:
@@ -140,12 +140,12 @@ class EventWizardCopyForm(forms.Form):
|
|||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
kwargs.pop('organizer')
|
kwargs.pop('organizer')
|
||||||
kwargs.pop('locales')
|
kwargs.pop('locales')
|
||||||
has_subevents = kwargs.pop('has_subevents')
|
kwargs.pop('has_subevents')
|
||||||
self.user = kwargs.pop('user')
|
self.user = kwargs.pop('user')
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
self.fields['copy_from_event'] = forms.ModelChoiceField(
|
self.fields['copy_from_event'] = forms.ModelChoiceField(
|
||||||
label=_("Copy configuration from"),
|
label=_("Copy configuration from"),
|
||||||
queryset=EventWizardCopyForm.copy_from_queryset(self.user).filter(has_subevents=has_subevents),
|
queryset=EventWizardCopyForm.copy_from_queryset(self.user),
|
||||||
widget=forms.RadioSelect,
|
widget=forms.RadioSelect,
|
||||||
empty_label=_('Do not copy'),
|
empty_label=_('Do not copy'),
|
||||||
required=False
|
required=False
|
||||||
|
|||||||
Reference in New Issue
Block a user