mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-11-30 04:13:01 +00:00
Compare commits
2 Commits
d3e832d23a
...
2a288ba474
Author | SHA1 | Date | |
---|---|---|---|
|
2a288ba474 | ||
|
34646b8ddb |
@ -80,6 +80,11 @@ class WEIChooseBusForm(forms.Form):
|
||||
|
||||
|
||||
class WEIMembershipForm(forms.ModelForm):
|
||||
caution_check = forms.BooleanField(
|
||||
required=False,
|
||||
label=_("Caution check given"),
|
||||
)
|
||||
|
||||
roles = forms.ModelMultipleChoiceField(
|
||||
queryset=WEIRole.objects,
|
||||
label=_("WEI Roles"),
|
||||
@ -148,6 +153,7 @@ class WEIMembership1AForm(WEIMembershipForm):
|
||||
"""
|
||||
Used to confirm registrations of first year members without choosing a bus now.
|
||||
"""
|
||||
caution_check = None
|
||||
roles = None
|
||||
|
||||
def clean(self):
|
||||
|
@ -90,7 +90,7 @@ WORDS = {
|
||||
Prends ton temps, observe les bien et quand tu te sens prêt⋅e, appuye sur le bouton 'Noter les bus' pour continuer
|
||||
(pas besoin d'apprendre par cœur les bus, la description du bus te sera rappeler avant de le noter !) <br><br><br>""" + print_all_buses(),
|
||||
{
|
||||
1: "Noter les bus :",
|
||||
"1": "Noter les bus :",
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -888,6 +888,9 @@ class WEIValidateRegistrationView(ProtectQuerysetMixin, ProtectedCreateView):
|
||||
form.fields["last_name"].initial = registration.user.last_name
|
||||
form.fields["first_name"].initial = registration.user.first_name
|
||||
|
||||
if "caution_check" in form.fields:
|
||||
form.fields["caution_check"].initial = registration.caution_check
|
||||
|
||||
if registration.soge_credit:
|
||||
form.fields["credit_type"].disabled = True
|
||||
form.fields["credit_type"].initial = NoteSpecial.objects.get(special_type="Virement bancaire")
|
||||
@ -929,6 +932,9 @@ class WEIValidateRegistrationView(ProtectQuerysetMixin, ProtectedCreateView):
|
||||
club = registration.wei
|
||||
user = registration.user
|
||||
|
||||
if "caution_check" in form.data:
|
||||
registration.caution_check = form.data["caution_check"] == "on"
|
||||
registration.save()
|
||||
membership = form.instance
|
||||
membership.user = user
|
||||
membership.club = club
|
||||
|
@ -2726,6 +2726,7 @@ msgid "Credit from Société générale"
|
||||
msgstr "Crédit de la Société générale"
|
||||
|
||||
#: apps/wei/models.py:188
|
||||
#: apps/wei/forms/registration.py:84
|
||||
msgid "Caution check given"
|
||||
msgstr "Chèque de caution donné"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user