From 1b1651c294b69809223900777c9fb3a979235ba6 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sun, 11 Oct 2020 16:49:31 +0200 Subject: [PATCH] Confirm email address is mandatory --- .../templates/participation/team_detail.html | 2 +- apps/participation/views.py | 1 + locale/fr/LC_MESSAGES/django.po | 32 +++++++++---------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/apps/participation/templates/participation/team_detail.html b/apps/participation/templates/participation/team_detail.html index a4570e4..04ccb6a 100644 --- a/apps/participation/templates/participation/team_detail.html +++ b/apps/participation/templates/participation/team_detail.html @@ -81,7 +81,7 @@ {% else %}
- {% trans "Your team must be composed of 3 members and each member must upload its photo authorization." %} + {% trans "Your team must be composed of 3 members and each member must upload its photo authorization and confirm its email address." %}
{% endif %} {% else %} diff --git a/apps/participation/views.py b/apps/participation/views.py index 6e8b9d0..b0f5336 100644 --- a/apps/participation/views.py +++ b/apps/participation/views.py @@ -101,6 +101,7 @@ class TeamDetailView(LoginRequiredMixin, DetailView): team = self.object context["can_validate"] = team.students.count() >= 3 and \ + all(r.email_confirmed for r in team.students.all()) and \ all(r.photo_authorization for r in team.students.all()) and \ team.participation.problem diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 6876998..9f785fa 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Corres2math\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-11 16:27+0200\n" +"POT-Creation-Date: 2020-10-11 16:48+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Yohann D'ANELLO \n" "Language-Team: LANGUAGE \n" @@ -329,10 +329,10 @@ msgstr "Soumettre mon équipe à validation" #: apps/participation/templates/participation/team_detail.html:84 msgid "" "Your team must be composed of 3 members and each member must upload its " -"photo authorization." +"photo authorization and confirm its email address." msgstr "" "Votre équipe doit être composée de 3 membres et chaque membre doit envoyer " -"son autorisation de droit à l'image." +"son autorisation de droit à l'image et confirmé son adresse e-mail." #: apps/participation/templates/participation/team_detail.html:89 msgid "This team didn't ask for validation yet." @@ -364,25 +364,25 @@ msgstr "Vous êtes déjà dans une équipe." msgid "Join team" msgstr "Rejoindre une équipe" -#: apps/participation/views.py:86 apps/participation/views.py:172 +#: apps/participation/views.py:86 apps/participation/views.py:175 msgid "You are not in a team." msgstr "Vous n'êtes pas dans une équipe." -#: apps/participation/views.py:87 apps/participation/views.py:173 +#: apps/participation/views.py:87 apps/participation/views.py:176 msgid "You don't participate, so you don't have any team." msgstr "Vous ne participez pas, vous n'avez donc pas d'équipe." -#: apps/participation/views.py:156 apps/registration/views.py:213 +#: apps/participation/views.py:159 apps/registration/views.py:213 #, python-brace-format msgid "Photo authorization of {student}.{ext}" msgstr "Autorisation de droit à l'image de {student}.{ext}" -#: apps/participation/views.py:160 +#: apps/participation/views.py:163 #, python-brace-format msgid "Photo authorizations of team {trigram}.zip" msgstr "Autorisations de droit à l'image de l'équipe {trigram}.zip" -#: apps/participation/views.py:182 +#: apps/participation/views.py:185 msgid "The team is not validated yet." msgstr "L'équipe n'est pas encore validée." @@ -515,14 +515,6 @@ msgstr "" "Un email a été envoyé. Merci de cliquer sur le lien pour activer votre " "compte." -#: apps/registration/templates/registration/logged_out.html:8 -msgid "Thanks for spending some quality time with the Web site today." -msgstr "Merci d'avoir utilisé la plateforme des Correspondances." - -#: apps/registration/templates/registration/logged_out.html:9 -msgid "Log in again" -msgstr "Se reconnecter" - #: apps/registration/templates/registration/mails/email_validation_email.html:12 #: apps/registration/templates/registration/mails/email_validation_email.txt:3 msgid "Hi" @@ -846,6 +838,14 @@ msgstr "" msgid "Contact us" msgstr "Nous contacter" +#: templates/registration/logged_out.html:8 +msgid "Thanks for spending some quality time with the Web site today." +msgstr "Merci d'avoir utilisé la plateforme des Correspondances." + +#: templates/registration/logged_out.html:9 +msgid "Log in again" +msgstr "Se reconnecter" + #: templates/registration/login.html:13 #, python-format msgid ""