From e4fa6c0321d42a9e6642925806c5c588fc02f6cd Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Tue, 19 Jan 2021 01:19:18 +0100 Subject: [PATCH] Use a checkbox widget to select tournament organizers --- apps/participation/forms.py | 1 + .../templates/participation/tournament_detail.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/participation/forms.py b/apps/participation/forms.py index b7032cb..7a973ce 100644 --- a/apps/participation/forms.py +++ b/apps/participation/forms.py @@ -109,6 +109,7 @@ class TournamentForm(forms.ModelForm): format=formats.get_format_lazy(format_type="DATETIME_INPUT_FORMATS", use_l10n=True)[0]) self.fields["syntheses_second_phase_limit"].widget = DateTimePickerInput( format=formats.get_format_lazy(format_type="DATETIME_INPUT_FORMATS", use_l10n=True)[0]) + self.fields["organizers"].widget = forms.CheckboxSelectMultiple() class Meta: model = Tournament diff --git a/apps/participation/templates/participation/tournament_detail.html b/apps/participation/templates/participation/tournament_detail.html index b7fc4c4..369ec5d 100644 --- a/apps/participation/templates/participation/tournament_detail.html +++ b/apps/participation/templates/participation/tournament_detail.html @@ -47,7 +47,7 @@ - {% if user.registration.isadmin or user.registration in tournament.organizers.all %} + {% if user.registration.is_admin or user.registration in tournament.organizers.all %}