mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-02-23 21:01:22 +00:00
Compare commits
No commits in common. "7984ce8e1da42e2a8348c4f23a0202d6fa5a26c0" and "6c064d6570d7203f1d4a9cb91d820b3b8667814c" have entirely different histories.
7984ce8e1d
...
6c064d6570
@ -179,6 +179,7 @@ class TeamDetailView(LoginRequiredMixin, FormMixin, ProcessFormView, DetailView)
|
||||
# their health sheet, they confirmed their email address and under-18 people sent their parental authorization.
|
||||
context["can_validate"] = team.students.count() >= 4 and team.coaches.exists() and \
|
||||
team.participation.tournament and \
|
||||
all(r.email_confirmed for r in team.students.all()) and \
|
||||
all(r.photo_authorization for r in team.participants.all()) and \
|
||||
(team.participation.tournament.remote
|
||||
or all(r.health_sheet for r in team.students.all() if r.under_18)) and \
|
||||
@ -292,7 +293,7 @@ class TeamUpdateView(LoginRequiredMixin, UpdateView):
|
||||
if user.registration.is_admin or user.registration.participates and \
|
||||
user.registration.team and user.registration.team.pk == kwargs["pk"] \
|
||||
or user.registration.is_volunteer \
|
||||
and self.get_object().participation.tournament in user.registration.interesting_tournaments:
|
||||
and self.object.participation.tournament in user.registration.interesting_tournaments:
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
raise PermissionDenied
|
||||
|
||||
|
@ -14,9 +14,7 @@
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<div id="registration_form">
|
||||
{{ volunteer_registration_form|crispy }}
|
||||
</div>
|
||||
<div id="registration_form"></div>
|
||||
<button class="btn btn-success" type="submit">
|
||||
{% trans "Add organizer" %}
|
||||
</button>
|
||||
|
@ -97,7 +97,7 @@ class AddOrganizerView(VolunteerMixin, CreateView):
|
||||
del context["admin_registration_form"].fields["email_confirmed"]
|
||||
|
||||
if not self.request.user.registration.is_admin:
|
||||
context["form"].fields["type"].widget.attrs['readonly'] = True
|
||||
del context["form"].fields["type"]
|
||||
del context["admin_registration_form"]
|
||||
|
||||
return context
|
||||
|
Loading…
x
Reference in New Issue
Block a user