mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-08-03 14:16:54 +02:00
Soge credit fixed
This commit is contained in:
@@ -798,11 +798,6 @@ class WEIUpdateRegistrationView(ProtectQuerysetMixin, LoginRequiredMixin, Update
|
||||
choose_bus_form.fields["team"].queryset = BusTeam.objects.filter(bus__wei=context["club"])
|
||||
context["membership_form"] = choose_bus_form
|
||||
|
||||
if not self.object.soge_credit and self.object.user.profile.soge:
|
||||
form = context["form"]
|
||||
form.fields["soge_credit"].disabled = True
|
||||
form.fields["soge_credit"].help_text = _("You already opened an account in the Société générale.")
|
||||
|
||||
return context
|
||||
|
||||
def get_form(self, form_class=None):
|
||||
@@ -823,6 +818,10 @@ class WEIUpdateRegistrationView(ProtectQuerysetMixin, LoginRequiredMixin, Update
|
||||
form.fields["deposit_type"].required = True
|
||||
form.fields["deposit_type"].help_text = _("Choose how you want to pay the deposit")
|
||||
|
||||
if self.object.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.")
|
||||
|
||||
return form
|
||||
|
||||
def get_membership_form(self, data=None, instance=None):
|
||||
|
Reference in New Issue
Block a user