From 73878d03ab5e4b2ffd2c8587233c74b48706c050 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Tue, 21 Apr 2020 01:06:54 +0200 Subject: [PATCH] Delete registrations --- apps/wei/tables.py | 2 +- apps/wei/urls.py | 5 +- apps/wei/views.py | 52 +++++- locale/de/LC_MESSAGES/django.po | 106 ++++++++---- locale/fr/LC_MESSAGES/django.po | 154 ++++++++++++------ templates/base.html | 8 +- templates/wei/weimembership_form.html | 2 +- .../wei/weiregistration_confirm_delete.html | 37 +++++ templates/wei/weiregistration_form.html | 12 +- 9 files changed, 270 insertions(+), 108 deletions(-) create mode 100644 templates/wei/weiregistration_confirm_delete.html diff --git a/apps/wei/tables.py b/apps/wei/tables.py index 41df47a2..1e4d7cf5 100644 --- a/apps/wei/tables.py +++ b/apps/wei/tables.py @@ -60,7 +60,7 @@ class WEIRegistrationTable(tables.Table): ) delete = tables.LinkColumn( - 'wei:wei_detail', + 'wei:wei_delete_registration', args=[A('pk')], verbose_name=_("delete"), text=_("Delete"), diff --git a/apps/wei/urls.py b/apps/wei/urls.py index 2523f659..2c0b2ea0 100644 --- a/apps/wei/urls.py +++ b/apps/wei/urls.py @@ -5,8 +5,8 @@ from django.urls import path from .views import CurrentWEIDetailView, WEIListView, WEICreateView, WEIDetailView, WEIUpdateView,\ BusCreateView, BusManageView, BusUpdateView, BusTeamCreateView, BusTeamManageView, BusTeamUpdateView,\ - WEIRegister1AView, WEIRegister2AView, WEIUpdateRegistrationView, WEIValidateRegistrationView,\ - WEISurveyView, WEISurveyEndView, WEIClosedView + WEIRegister1AView, WEIRegister2AView, WEIUpdateRegistrationView, WEIDeleteRegistrationView,\ + WEIValidateRegistrationView, WEISurveyView, WEISurveyEndView, WEIClosedView app_name = 'wei' @@ -27,6 +27,7 @@ urlpatterns = [ path('register//1A/myself/', WEIRegister1AView.as_view(), name="wei_register_1A_myself"), path('register//2A+/myself/', WEIRegister2AView.as_view(), name="wei_register_2A_myself"), path('edit-registration//', WEIUpdateRegistrationView.as_view(), name="wei_update_registration"), + path('delete-registration//', WEIDeleteRegistrationView.as_view(), name="wei_delete_registration"), path('validate//', WEIValidateRegistrationView.as_view(), name="validate_registration"), path('survey//', WEISurveyView.as_view(), name="wei_survey"), path('survey//end/', WEISurveyEndView.as_view(), name="wei_survey_end"), diff --git a/apps/wei/views.py b/apps/wei/views.py index 706eb049..63096fcc 100644 --- a/apps/wei/views.py +++ b/apps/wei/views.py @@ -11,7 +11,7 @@ from django.shortcuts import redirect from django.urls import reverse_lazy from django.views.generic import DetailView, UpdateView, CreateView, RedirectView, TemplateView from django.utils.translation import gettext_lazy as _ -from django.views.generic.edit import BaseFormView +from django.views.generic.edit import BaseFormView, DeleteView from django_tables2 import SingleTableView from member.models import Membership, Club from note.models import Transaction, NoteClub @@ -350,6 +350,19 @@ class WEIRegister1AView(ProtectQuerysetMixin, LoginRequiredMixin, CreateView): def form_valid(self, form): form.instance.wei = WEIClub.objects.get(pk=self.kwargs["wei_pk"]) form.instance.first_year = True + + if not form.instance.pk: + # Check if the user is not already registered to the WEI + if WEIRegistration.objects.filter(wei=form.instance.wei, user=form.instance.user).exists(): + form.add_error('user', _("This user is already registered to this WEI.")) + return self.form_invalid(form) + + # Check if the user can be in her/his first year (yeah, no cheat) + if WEIRegistration.objects.filter(user=form.instance.user).exists(): + form.add_error('user', _("This user can't be in her/his first year since he/she has already" + " participed to a WEI.")) + return self.form_invalid(form) + return super().form_valid(form) def get_success_url(self): @@ -406,9 +419,15 @@ class WEIRegister2AView(ProtectQuerysetMixin, LoginRequiredMixin, CreateView): form.instance.wei = WEIClub.objects.get(pk=self.kwargs["wei_pk"]) form.instance.first_year = False + if not form.instance.pk: + # Check if the user is not already registered to the WEI + if WEIRegistration.objects.filter(wei=form.instance.wei, user=form.instance.user).exists(): + form.add_error('user', _("This user is already registered to this WEI.")) + return self.form_invalid(form) + choose_bus_form = WEIChooseBusForm(self.request.POST) if not choose_bus_form.is_valid(): - return self.form_invalid(choose_bus_form) + return self.form_invalid(form) information = form.instance.information information["preferred_bus_pk"] = [bus.pk for bus in choose_bus_form.cleaned_data["bus"]] @@ -422,11 +441,6 @@ class WEIRegister2AView(ProtectQuerysetMixin, LoginRequiredMixin, CreateView): return super().form_valid(form) - def form_invalid(self, form): - print(form.data) - print(form.cleaned_data) - return super().form_invalid(form) - def get_success_url(self): self.object.refresh_from_db() return reverse_lazy("wei:wei_survey", kwargs={"pk": self.object.pk}) @@ -490,14 +504,14 @@ class WEIUpdateRegistrationView(ProtectQuerysetMixin, LoginRequiredMixin, Update if form.instance.is_validated: membership_form = WEIMembershipForm(self.request.POST) if not membership_form.is_valid(): - return self.form_invalid(membership_form) + return self.form_invalid(form) membership_form.save() # If it is not validated and if this is an old member, then we update the choices elif not form.instance.first_year and PermissionBackend.check_perm( self.request.user, "wei.change_weiregistration_information_json", self.object): choose_bus_form = WEIChooseBusForm(self.request.POST) if not choose_bus_form.is_valid(): - return self.form_invalid(choose_bus_form) + return self.form_invalid(form) information = form.instance.information information["preferred_bus_pk"] = [bus.pk for bus in choose_bus_form.cleaned_data["bus"]] information["preferred_bus_name"] = [bus.name for bus in choose_bus_form.cleaned_data["bus"]] @@ -519,6 +533,26 @@ class WEIUpdateRegistrationView(ProtectQuerysetMixin, LoginRequiredMixin, Update return reverse_lazy("wei:wei_detail", kwargs={"pk": self.object.wei.pk}) +class WEIDeleteRegistrationView(ProtectQuerysetMixin, LoginRequiredMixin, DeleteView): + model = WEIRegistration + + def dispatch(self, request, *args, **kwargs): + wei = self.get_object().wei + today = date.today() + # We can't delete a registration of a past WEI + if today > wei.membership_end: + return redirect(reverse_lazy('wei:wei_closed', args=(wei.pk,))) + return super().dispatch(request, *args, **kwargs) + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context["club"] = self.object.wei + return context + + def get_success_url(self): + return reverse_lazy('wei:wei_detail', args=(self.object.wei.pk,)) + + class WEIValidateRegistrationView(ProtectQuerysetMixin, LoginRequiredMixin, CreateView): """ Validate WEI Registration diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index cd214c68..6fee90d4 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-20 22:34+0200\n" +"POT-Creation-Date: 2020-04-21 01:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -439,7 +439,7 @@ msgstr "" msgid "fee" msgstr "" -#: apps/member/models.py:267 apps/member/views.py:500 apps/wei/views.py:592 +#: apps/member/models.py:267 apps/member/views.py:500 apps/wei/views.py:645 msgid "User is not a member of the parent club" msgstr "" @@ -470,7 +470,7 @@ msgstr "" #: apps/member/views.py:65 templates/member/profile_info.html:45 #: templates/registration/future_profile_detail.html:55 -#: templates/wei/weimembership_form.html:105 +#: templates/wei/weimembership_form.html:116 msgid "Update Profile" msgstr "" @@ -482,7 +482,7 @@ msgstr "" msgid "Search user" msgstr "" -#: apps/member/views.py:495 apps/wei/views.py:583 +#: apps/member/views.py:495 apps/wei/views.py:636 msgid "" "This user don't have enough money to join this club, and can't have a " "negative balance." @@ -727,6 +727,7 @@ msgid "No reason specified" msgstr "" #: apps/note/tables.py:122 apps/note/tables.py:151 apps/wei/tables.py:66 +#: templates/wei/weiregistration_confirm_delete.html:32 msgid "Delete" msgstr "" @@ -1003,23 +1004,37 @@ msgstr "" msgid "WEI" msgstr "" -#: apps/wei/forms/registration.py:47 +#: apps/wei/forms/registration.py:47 apps/wei/models.py:108 +#: apps/wei/models.py:269 +msgid "bus" +msgstr "" + +#: apps/wei/forms/registration.py:48 msgid "" "This choice is not definitive. The WEI organizers are free to attribute for " "you a bus and a team, in particular if you are a free eletron." msgstr "" #: apps/wei/forms/registration.py:54 +msgid "Team" +msgstr "" + +#: apps/wei/forms/registration.py:56 msgid "" "Leave this field empty if you won't be in a team (staff, bus chief, free " "electron)" msgstr "" -#: apps/wei/forms/registration.py:59 +#: apps/wei/forms/registration.py:61 apps/wei/forms/registration.py:67 +#: apps/wei/models.py:142 +msgid "WEI Roles" +msgstr "" + +#: apps/wei/forms/registration.py:62 msgid "Select the roles that you are interested in." msgstr "" -#: apps/wei/forms/registration.py:65 apps/wei/forms/registration.py:75 +#: apps/wei/forms/registration.py:72 msgid "This team doesn't belong to the given bus." msgstr "" @@ -1055,10 +1070,6 @@ msgstr "" msgid "Buses" msgstr "" -#: apps/wei/models.py:108 apps/wei/models.py:269 -msgid "bus" -msgstr "" - #: apps/wei/models.py:116 msgid "color" msgstr "" @@ -1079,10 +1090,6 @@ msgstr "" msgid "WEI Role" msgstr "" -#: apps/wei/models.py:142 -msgid "WEI Roles" -msgstr "" - #: apps/wei/models.py:166 msgid "Credit from Société générale" msgstr "" @@ -1196,19 +1203,29 @@ msgstr "" msgid "Register 1A" msgstr "" -#: apps/wei/views.py:377 templates/wei/weiclub_info.html:63 +#: apps/wei/views.py:357 apps/wei/views.py:425 +msgid "This user is already registered to this WEI." +msgstr "" + +#: apps/wei/views.py:362 +msgid "" +"This user can't be in her/his first year since he/she has already participed " +"to a WEI." +msgstr "" + +#: apps/wei/views.py:390 templates/wei/weiclub_info.html:63 msgid "Register 2A+" msgstr "" -#: apps/wei/views.py:394 +#: apps/wei/views.py:408 apps/wei/views.py:491 msgid "You already opened an account in the Société générale." msgstr "" -#: apps/wei/views.py:587 +#: apps/wei/views.py:640 msgid "This user didn't give her/his caution check." msgstr "" -#: apps/wei/views.py:655 apps/wei/views.py:675 apps/wei/views.py:685 +#: apps/wei/views.py:708 apps/wei/views.py:728 apps/wei/views.py:738 #: templates/wei/survey.html:12 templates/wei/survey_closed.html:12 #: templates/wei/survey_end.html:12 msgid "Survey WEI" @@ -1581,6 +1598,7 @@ msgid "" msgstr "" #: templates/registration/future_profile_detail.html:56 +#: templates/wei/weiregistration_confirm_delete.html:12 msgid "Delete registration" msgstr "" @@ -1589,8 +1607,8 @@ msgid "Validate account" msgstr "" #: templates/registration/future_profile_detail.html:71 -#: templates/wei/weimembership_form.html:115 -#: templates/wei/weimembership_form.html:173 +#: templates/wei/weimembership_form.html:126 +#: templates/wei/weimembership_form.html:184 msgid "Validate registration" msgstr "" @@ -1822,7 +1840,7 @@ msgstr "" msgid "The inscription for this WEI are now closed." msgstr "" -#: templates/wei/survey_closed.html:22 +#: templates/wei/survey_closed.html:20 msgid "Return to WEI detail" msgstr "" @@ -1902,31 +1920,44 @@ msgstr "" msgid "caution check given" msgstr "" +#: templates/wei/weimembership_form.html:103 +msgid "preferred bus" +msgstr "" + #: templates/wei/weimembership_form.html:106 +msgid "preferred team" +msgstr "" + +#: templates/wei/weimembership_form.html:109 +msgid "preferred roles" +msgstr "" + +#: templates/wei/weimembership_form.html:117 +#: templates/wei/weiregistration_confirm_delete.html:31 msgid "Update registration" msgstr "" -#: templates/wei/weimembership_form.html:119 +#: templates/wei/weimembership_form.html:130 msgid "The registration is already validated and can't be unvalidated." msgstr "" -#: templates/wei/weimembership_form.html:120 +#: templates/wei/weimembership_form.html:131 msgid "The user joined the bus" msgstr "" -#: templates/wei/weimembership_form.html:121 +#: templates/wei/weimembership_form.html:132 msgid "in the team" msgstr "" -#: templates/wei/weimembership_form.html:122 +#: templates/wei/weimembership_form.html:133 msgid "in no team (staff)" msgstr "" -#: templates/wei/weimembership_form.html:122 +#: templates/wei/weimembership_form.html:133 msgid "with the following roles:" msgstr "" -#: templates/wei/weimembership_form.html:127 +#: templates/wei/weimembership_form.html:138 msgid "" "\n" " The WEI will be paid by Société générale. The " @@ -1938,7 +1969,7 @@ msgid "" " " msgstr "" -#: templates/wei/weimembership_form.html:137 +#: templates/wei/weimembership_form.html:148 #, python-format msgid "" "\n" @@ -1947,15 +1978,15 @@ msgid "" " " msgstr "" -#: templates/wei/weimembership_form.html:144 +#: templates/wei/weimembership_form.html:155 msgid "The note has enough money, the registration is possible." msgstr "" -#: templates/wei/weimembership_form.html:151 +#: templates/wei/weimembership_form.html:162 msgid "The user didn't give her/his caution check." msgstr "" -#: templates/wei/weimembership_form.html:159 +#: templates/wei/weimembership_form.html:170 #, python-format msgid "" "\n" @@ -1968,3 +1999,14 @@ msgid "" " the registration of the WEI.\n" " " msgstr "" + +#: templates/wei/weiregistration_confirm_delete.html:17 +msgid "This registration is already validated and can't be deleted." +msgstr "" + +#: templates/wei/weiregistration_confirm_delete.html:24 +#, python-format +msgid "" +"Are you sure you want to delete the registration of %(user)s for the WEI " +"%(wei_name)s? This action can't be undoed." +msgstr "" diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 868c9a5b..cd76af81 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-20 22:34+0200\n" +"POT-Creation-Date: 2020-04-21 01:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -439,7 +439,7 @@ msgstr "l'adhésion finit le" msgid "fee" msgstr "cotisation" -#: apps/member/models.py:267 apps/member/views.py:500 apps/wei/views.py:592 +#: apps/member/models.py:267 apps/member/views.py:500 apps/wei/views.py:645 msgid "User is not a member of the parent club" msgstr "L'utilisateur n'est pas membre du club parent" @@ -470,7 +470,7 @@ msgstr "Cette adresse doit être valide." #: apps/member/views.py:65 templates/member/profile_info.html:45 #: templates/registration/future_profile_detail.html:55 -#: templates/wei/weimembership_form.html:105 +#: templates/wei/weimembership_form.html:116 msgid "Update Profile" msgstr "Modifier le profil" @@ -482,7 +482,7 @@ msgstr "Un alias avec un nom similaire existe déjà." msgid "Search user" msgstr "Chercher un utilisateur" -#: apps/member/views.py:495 apps/wei/views.py:583 +#: apps/member/views.py:495 apps/wei/views.py:636 msgid "" "This user don't have enough money to join this club, and can't have a " "negative balance." @@ -730,6 +730,7 @@ msgid "No reason specified" msgstr "Pas de motif spécifié" #: apps/note/tables.py:122 apps/note/tables.py:151 apps/wei/tables.py:66 +#: templates/wei/weiregistration_confirm_delete.html:32 msgid "Delete" msgstr "Supprimer" @@ -1011,27 +1012,42 @@ msgstr "supprimer" msgid "WEI" msgstr "WEI" -#: apps/wei/forms/registration.py:47 +#: apps/wei/forms/registration.py:47 apps/wei/models.py:108 +#: apps/wei/models.py:269 +msgid "bus" +msgstr "Bus" + +#: apps/wei/forms/registration.py:48 msgid "" "This choice is not definitive. The WEI organizers are free to attribute for " "you a bus and a team, in particular if you are a free eletron." msgstr "" "Ce choix n'est pas définitif. Les organisateurs du WEI sont libres de vous " -"attribuer un bus et une équipe, en particulier si vous êtes un électron libre." +"attribuer un bus et une équipe, en particulier si vous êtes un électron " +"libre." #: apps/wei/forms/registration.py:54 +msgid "Team" +msgstr "Équipe" + +#: apps/wei/forms/registration.py:56 msgid "" "Leave this field empty if you won't be in a team (staff, bus chief, free " "electron)" msgstr "" -"Laissez ce champ vide si vous ne serez pas dans une équipe (staff, chef " -"de bus ou électron libre)" +"Laissez ce champ vide si vous ne serez pas dans une équipe (staff, chef de " +"bus ou électron libre)" -#: apps/wei/forms/registration.py:59 +#: apps/wei/forms/registration.py:61 apps/wei/forms/registration.py:67 +#: apps/wei/models.py:142 +msgid "WEI Roles" +msgstr "Rôles au WEI" + +#: apps/wei/forms/registration.py:62 msgid "Select the roles that you are interested in." msgstr "Sélectionnez les rôles qui vous intéressent." -#: apps/wei/forms/registration.py:65 apps/wei/forms/registration.py:75 +#: apps/wei/forms/registration.py:72 msgid "This team doesn't belong to the given bus." msgstr "Cette équipe n'appartient pas à ce bus." @@ -1057,7 +1073,8 @@ msgstr "informations sur le questionnaire" #: apps/wei/models.py:73 msgid "Information about the survey for new members, encoded in JSON" -msgstr "Informations sur le sondage pour les nouveaux membres, encodées en JSON" +msgstr "" +"Informations sur le sondage pour les nouveaux membres, encodées en JSON" #: apps/wei/models.py:95 msgid "Bus" @@ -1067,10 +1084,6 @@ msgstr "Bus" msgid "Buses" msgstr "Bus" -#: apps/wei/models.py:108 apps/wei/models.py:269 -msgid "bus" -msgstr "Bus" - #: apps/wei/models.py:116 msgid "color" msgstr "couleur" @@ -1092,10 +1105,6 @@ msgstr "Équipes de bus" msgid "WEI Role" msgstr "Rôle au WEI" -#: apps/wei/models.py:142 -msgid "WEI Roles" -msgstr "Rôles au WEI" - #: apps/wei/models.py:166 msgid "Credit from Société générale" msgstr "Crédit de la Société générale" @@ -1192,10 +1201,6 @@ msgstr "Participants au WEI" msgid "team" msgstr "équipe" -#: apps/wei/models.py:279 -msgid "Team" -msgstr "Équipe" - #: apps/wei/models.py:289 msgid "WEI registration" msgstr "inscription au WEI" @@ -1221,19 +1226,31 @@ msgstr "Équipes" msgid "Register 1A" msgstr "Inscrire un 1A" -#: apps/wei/views.py:377 templates/wei/weiclub_info.html:63 +#: apps/wei/views.py:357 apps/wei/views.py:425 +msgid "This user is already registered to this WEI." +msgstr "Cette personne est déjà inscrite au WEI." + +#: apps/wei/views.py:362 +msgid "" +"This user can't be in her/his first year since he/she has already participed " +"to a WEI." +msgstr "" +"Cet utilisateur ne peut pas être en première année puisqu'iel a déjà " +"participé à un WEI." + +#: apps/wei/views.py:390 templates/wei/weiclub_info.html:63 msgid "Register 2A+" msgstr "Inscrire un 2A+" -#: apps/wei/views.py:394 +#: apps/wei/views.py:408 apps/wei/views.py:491 msgid "You already opened an account in the Société générale." msgstr "Vous avez déjà ouvert un compte auprès de la société générale." -#: apps/wei/views.py:587 +#: apps/wei/views.py:640 msgid "This user didn't give her/his caution check." msgstr "Cet utilisateur n'a pas donné son chèque de caution." -#: apps/wei/views.py:655 apps/wei/views.py:675 apps/wei/views.py:685 +#: apps/wei/views.py:708 apps/wei/views.py:728 apps/wei/views.py:738 #: templates/wei/survey.html:12 templates/wei/survey_closed.html:12 #: templates/wei/survey_end.html:12 msgid "Survey WEI" @@ -1614,6 +1631,7 @@ msgstr "" "pour activer votre compte." #: templates/registration/future_profile_detail.html:56 +#: templates/wei/weiregistration_confirm_delete.html:12 msgid "Delete registration" msgstr "Supprimer l'inscription" @@ -1622,8 +1640,8 @@ msgid "Validate account" msgstr "Valider le compte" #: templates/registration/future_profile_detail.html:71 -#: templates/wei/weimembership_form.html:115 -#: templates/wei/weimembership_form.html:173 +#: templates/wei/weimembership_form.html:126 +#: templates/wei/weimembership_form.html:184 msgid "Validate registration" msgstr "Valider l'inscription" @@ -1872,13 +1890,14 @@ msgstr "Suivant" msgid "The inscription for this WEI are now closed." msgstr "Les inscriptions pour le WEI sont fermées." -#: templates/wei/survey_closed.html:22 +#: templates/wei/survey_closed.html:20 msgid "Return to WEI detail" msgstr "Retour aux détails du WEI" #: templates/wei/survey_end.html:16 msgid "The survey is now ended. Your answers have been saved." -msgstr "Le sondage est désormais terminé, vos réponses ont bien été enregistrées." +msgstr "" +"Le sondage est désormais terminé, vos réponses ont bien été enregistrées." #: templates/wei/weiclub_info.html:31 msgid "WEI fee / including BDE and Kfet fee (paid students)" @@ -1952,31 +1971,44 @@ msgstr "L'algorithme n'a pas été exécuté." msgid "caution check given" msgstr "chèque de caution donné" +#: templates/wei/weimembership_form.html:103 +msgid "preferred bus" +msgstr "" + #: templates/wei/weimembership_form.html:106 +msgid "preferred team" +msgstr "" + +#: templates/wei/weimembership_form.html:109 +msgid "preferred roles" +msgstr "" + +#: templates/wei/weimembership_form.html:117 +#: templates/wei/weiregistration_confirm_delete.html:31 msgid "Update registration" msgstr "Mettre à jour l'inscription" -#: templates/wei/weimembership_form.html:119 +#: templates/wei/weimembership_form.html:130 msgid "The registration is already validated and can't be unvalidated." msgstr "L'inscription a déjà été validée et ne peut pas être dévalidée." -#: templates/wei/weimembership_form.html:120 +#: templates/wei/weimembership_form.html:131 msgid "The user joined the bus" msgstr "L'utilisateur a rejoint le bus" -#: templates/wei/weimembership_form.html:121 +#: templates/wei/weimembership_form.html:132 msgid "in the team" msgstr "dans l'équipe" -#: templates/wei/weimembership_form.html:122 +#: templates/wei/weimembership_form.html:133 msgid "in no team (staff)" msgstr "dans aucune équipe (staff)" -#: templates/wei/weimembership_form.html:122 +#: templates/wei/weimembership_form.html:133 msgid "with the following roles:" msgstr "avec les rôles suivants :" -#: templates/wei/weimembership_form.html:127 +#: templates/wei/weimembership_form.html:138 msgid "" "\n" " The WEI will be paid by Société générale. The " @@ -1988,35 +2020,36 @@ msgid "" " " msgstr "" "\n" -"Le WEI va être payé par la Société générale. " -"L'adhésion sera créée même si la banque n'a pas encore payé le BDE.\n" -"La transaction d'adhésion sera créée mais invalide. " -"Vous devrez la valider une fois que la banque\n" -"aura validé la création du compte, ou bien changer " -"de moyen de paiement.\n" +"Le WEI va être payé par la Société générale. L'adhésion sera créée même si " +"la banque n'a pas encore payé le BDE.\n" +"La transaction d'adhésion sera créée mais invalide. Vous devrez la valider " +"une fois que la banque\n" +"aura validé la création du compte, ou bien changer de moyen de paiement.\n" " " -#: templates/wei/weimembership_form.html:137 +#: templates/wei/weimembership_form.html:148 +#, python-format msgid "" "\n" -"The note don't have enough money " +" The note don't have enough money " "(%(balance)s, %(pretty_fee)s required). The registration may fail.\n" " " msgstr "" "\n" -"La note n'a pas assez d'argent (%(balance)s, " -"%(pretty_fee)s requis). L'inscription va échouer.\n" +"La note n'a pas assez d'argent (%(balance)s, %(pretty_fee)s requis). " +"L'inscription va échouer.\n" " " -#: templates/wei/weimembership_form.html:144 +#: templates/wei/weimembership_form.html:155 msgid "The note has enough money, the registration is possible." msgstr "La note a assez d'argent, l'inscription est possible." -#: templates/wei/weimembership_form.html:151 +#: templates/wei/weimembership_form.html:162 msgid "The user didn't give her/his caution check." msgstr "L'utilisateur n'a pas donné son chèque de caution." -#: templates/wei/weimembership_form.html:159 +#: templates/wei/weimembership_form.html:170 +#, python-format msgid "" "\n" " This user is not a member of the Kfet club. " @@ -2029,9 +2062,22 @@ msgid "" " " msgstr "" "\n" -"Cet utilisateur n'est pas membre du club Kfet. Merci " -"de le faire adhérer\n" -"ici s'il est en première année\n" -"ou ici s'il est un ancien membre avant de valider\n" +"Cet utilisateur n'est pas membre du club Kfet. Merci de le faire adhérer\n" +"ici s'iel est en première année\n" +"ou ici s'iel est un ancien membre avant de " +"valider\n" "l'inscription au WEI.\n" " " + +#: templates/wei/weiregistration_confirm_delete.html:17 +msgid "This registration is already validated and can't be deleted." +msgstr "L'inscription a déjà été validée et ne peut pas être supprimée." + +#: templates/wei/weiregistration_confirm_delete.html:24 +#, python-format +msgid "" +"Are you sure you want to delete the registration of %(user)s for the WEI " +"%(wei_name)s? This action can't be undoed." +msgstr "" +"Êtes-vous sûr de vouloir supprimer l'inscription de %(user)s pour le WEI " +"%(wei_name)s ? Cette action ne pourra pas être annulée." diff --git a/templates/base.html b/templates/base.html index f39f9bad..f2d0b3d1 100644 --- a/templates/base.html +++ b/templates/base.html @@ -111,9 +111,11 @@ SPDX-License-Identifier: GPL-3.0-or-later {% trans 'Treasury' %} {% endif %} - + {% if "wei.weiclub"|not_empty_model_change_list %} + + {% endif %}