mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-07-17 06:45:53 +02:00
Minor fixes
This commit is contained in:
@ -4810,18 +4810,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "permission.role",
|
||||
"pk": 16,
|
||||
"fields": {
|
||||
"for_club": null,
|
||||
"name": "\u00c9lectron libre (avec perm)",
|
||||
"permissions": [
|
||||
22,
|
||||
84
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "permission.role",
|
||||
"pk": 17,
|
||||
@ -5093,11 +5081,6 @@
|
||||
"pk": 15,
|
||||
"fields": {}
|
||||
},
|
||||
{
|
||||
"model": "wei.weirole",
|
||||
"pk": 16,
|
||||
"fields": {}
|
||||
},
|
||||
{
|
||||
"model": "wei.weirole",
|
||||
"pk": 17,
|
||||
|
@ -99,7 +99,7 @@ class WEIChooseBusForm(forms.Form):
|
||||
queryset=WEIRole.objects.filter(~Q(name="1A") & ~Q(name="GC WEI")),
|
||||
label=_("WEI Roles"),
|
||||
help_text=_("Select the roles that you are interested in."),
|
||||
initial=WEIRole.objects.filter(name="Adhérent⋅e WEI").all(),
|
||||
initial=WEIRole.objects.filter(Q(name="Adhérent⋅e WEI") | Q(name="\u00c9lectron libre")).all(),
|
||||
widget=CheckboxSelectMultiple(),
|
||||
)
|
||||
|
||||
|
@ -567,6 +567,8 @@ class WEIRegister1AView(ProtectQuerysetMixin, ProtectedCreateView):
|
||||
if "caution_type" in form.fields:
|
||||
del form.fields["caution_type"]
|
||||
|
||||
if "soge_credit" in form.fields:
|
||||
form.fields["soge_credit"].help_text = _('Check if you will open a Société Générale account')
|
||||
return form
|
||||
|
||||
@transaction.atomic
|
||||
@ -658,6 +660,9 @@ class WEIRegister2AView(ProtectQuerysetMixin, ProtectedCreateView):
|
||||
def get_form(self, form_class=None):
|
||||
form = super().get_form(form_class)
|
||||
form.fields["user"].initial = self.request.user
|
||||
if "soge_credit" in form.fields:
|
||||
form.fields["soge_credit"].help_text = _('Check if you will open a Société Générale account')
|
||||
|
||||
if "myself" in self.request.path and self.request.user.profile.soge:
|
||||
form.fields["soge_credit"].disabled = True
|
||||
form.fields["soge_credit"].help_text = _("You already opened an account in the Société générale.")
|
||||
@ -773,7 +778,7 @@ class WEIUpdateRegistrationView(ProtectQuerysetMixin, LoginRequiredMixin, Update
|
||||
form = super().get_form(form_class)
|
||||
form.fields["user"].disabled = True
|
||||
# The auto-json-format may cause issues with the default field remove
|
||||
if not PermissionBackend.check_perm(self.request, 'wei.change_weiregistration_information_json', self.object):
|
||||
if "information_json" in form.fields:
|
||||
del form.fields["information_json"]
|
||||
# Masquer le champ caution_check pour tout le monde dans le formulaire de modification
|
||||
if "caution_check" in form.fields:
|
||||
|
Reference in New Issue
Block a user