Event creation: Use select2 for event/organizer selection and properly support admin sessions

This commit is contained in:
Raphael Michel
2019-05-28 10:42:14 +02:00
parent 6c701d66b1
commit d5c0b0f71d
3 changed files with 47 additions and 10 deletions

View File

@@ -97,7 +97,7 @@ class EventList(PaginationMixin, ListView):
def condition_copy(wizard):
return (
not wizard.clone_from and
EventWizardCopyForm.copy_from_queryset(wizard.request.user).exists()
EventWizardCopyForm.copy_from_queryset(wizard.request.user, wizard.request.session).exists()
)
@@ -176,7 +176,8 @@ class EventWizard(SafeSessionWizardView):
def get_form_kwargs(self, step=None):
kwargs = {
'user': self.request.user
'user': self.request.user,
'session': self.request.session,
}
if step != 'foundation':
fdata = self.get_cleaned_data_for_step('foundation')