1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-26 03:57:36 +02:00

De l'inclusif, partout

Signed-off-by: Emmy D'ANELLO <ynerant@crans.org>
This commit is contained in:
2022-08-29 13:19:19 +02:00
parent e3ee39ca81
commit ddbdd5b5d0
43 changed files with 510 additions and 496 deletions

View File

@ -74,7 +74,7 @@ class WEIChooseBusForm(forms.Form):
queryset=WEIRole.objects.filter(~Q(name="1A")),
label=_("WEI Roles"),
help_text=_("Select the roles that you are interested in."),
initial=WEIRole.objects.filter(name="Adhérent WEI").all(),
initial=WEIRole.objects.filter(name="Adhérent⋅e WEI").all(),
widget=CheckboxSelectMultiple(),
)

View File

@ -84,5 +84,5 @@ class Command(BaseCommand):
s += sep + user.profile.section_generated
s += sep + bus.name
s += sep + (team.name if team else "--")
s += sep + ", ".join(role.name for role in membership.roles.filter(~Q(name="Adhérent WEI")).all())
s += sep + ", ".join(role.name for role in membership.roles.filter(~Q(name="Adhérent⋅e WEI")).all())
self.stdout.write(s)

View File

@ -519,7 +519,7 @@ class TestWEIRegistration(TestCase):
emergency_contact_phone='+33600000000',
bus=[self.bus.id],
team=[self.team.id],
roles=[role.id for role in WEIRole.objects.filter(name="Adhérent WEI").all()],
roles=[role.id for role in WEIRole.objects.filter(name="Adhérent⋅e WEI").all()],
information_json=self.registration.information_json,
)
)
@ -573,7 +573,7 @@ class TestWEIRegistration(TestCase):
emergency_contact_phone='+33600000000',
bus=[self.bus.id],
team=[self.team.id],
roles=[role.id for role in WEIRole.objects.filter(name="Adhérent WEI").all()],
roles=[role.id for role in WEIRole.objects.filter(name="Adhérent⋅e WEI").all()],
information_json=self.registration.information_json,
)
)

View File

@ -916,7 +916,7 @@ class WEIValidateRegistrationView(ProtectQuerysetMixin, ProtectedCreateView):
form["team"].initial = BusTeam.objects.get(pk=information["preferred_team_pk"][0])
if "preferred_roles_pk" in information:
form["roles"].initial = WEIRole.objects.filter(
Q(pk__in=information["preferred_roles_pk"]) | Q(name="Adhérent WEI")
Q(pk__in=information["preferred_roles_pk"]) | Q(name="Adhérent⋅e WEI")
).all()
return form
@ -1008,7 +1008,7 @@ class WEIValidateRegistrationView(ProtectQuerysetMixin, ProtectedCreateView):
membership.save()
membership.refresh_from_db()
membership.roles.add(WEIRole.objects.get(name="Adhérent WEI"))
membership.roles.add(WEIRole.objects.get(name="Adhérent⋅e WEI"))
return super().form_valid(form)