mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 09:18:23 +02:00
Display informations about the final tournament in the sidebar
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -272,6 +272,19 @@ class ParticipantRegistration(Registration):
|
||||
'content': content,
|
||||
})
|
||||
|
||||
if self.team.participation.final:
|
||||
if not self.photo_authorization_final:
|
||||
text = _("You have not uploaded your photo authorization for the final tournament. "
|
||||
"You can do it by clicking on <a href=\"{photo_url}\">this link</a>.")
|
||||
photo_url = reverse_lazy("registration:upload_user_photo_authorization_final", args=(self.id,))
|
||||
content = format_lazy(text, photo_url=photo_url)
|
||||
informations.append({
|
||||
'title': _("Photo authorization"),
|
||||
'type': "danger",
|
||||
'priority': 5,
|
||||
'content': content,
|
||||
})
|
||||
|
||||
informations.extend(self.team.important_informations())
|
||||
|
||||
return informations
|
||||
@ -419,6 +432,20 @@ class StudentRegistration(ParticipantRegistration):
|
||||
'content': content,
|
||||
})
|
||||
|
||||
if self.team.participation.final:
|
||||
if self.under_18_final and not self.parental_authorization_final:
|
||||
text = _("You have not uploaded your parental authorization for the final tournament. "
|
||||
"You can do it by clicking on <a href=\"{parental_url}\">this link</a>.")
|
||||
parental_url = reverse_lazy("registration:upload_user_parental_authorization_final",
|
||||
args=(self.id,))
|
||||
content = format_lazy(text, parental_url=parental_url)
|
||||
informations.append({
|
||||
'title': _("Parental authorization"),
|
||||
'type': "danger",
|
||||
'priority': 5,
|
||||
'content': content,
|
||||
})
|
||||
|
||||
return informations
|
||||
|
||||
class Meta:
|
||||
|
@ -31,8 +31,8 @@ from tfjm.tokens import email_validation_token
|
||||
from tfjm.views import UserMixin, UserRegistrationMixin, VolunteerMixin
|
||||
|
||||
from .forms import AddOrganizerForm, CoachRegistrationForm, HealthSheetForm, \
|
||||
PhotoAuthorizationFinalForm, ParentalAuthorizationForm, PaymentAdminForm, PaymentForm, \
|
||||
ParentalAuthorizationFinalForm, PhotoAuthorizationForm, SignupForm, StudentRegistrationForm, UserForm, \
|
||||
ParentalAuthorizationFinalForm, ParentalAuthorizationForm, PaymentAdminForm, PaymentForm, \
|
||||
PhotoAuthorizationFinalForm, PhotoAuthorizationForm, SignupForm, StudentRegistrationForm, UserForm, \
|
||||
VaccineSheetForm, VolunteerRegistrationForm
|
||||
from .models import ParticipantRegistration, Payment, Registration, StudentRegistration
|
||||
from .tables import RegistrationTable
|
||||
|
Reference in New Issue
Block a user