mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-08-04 14:31:12 +02:00
Permissions
This commit is contained in:
@@ -808,7 +808,9 @@ class WEIUpdateRegistrationView(ProtectQuerysetMixin, LoginRequiredMixin, Update
|
||||
del form.fields["information_json"]
|
||||
# Masquer le champ deposit_given pour tout le monde dans le formulaire de modification
|
||||
if "deposit_given" in form.fields:
|
||||
del form.fields["deposit_given"]
|
||||
form.fields["deposit_given"].help_text = _("Tick if the deposit check has been given")
|
||||
if self.object.first_year or self.object.deposit_type == 'note':
|
||||
del form.fields["deposit_given"]
|
||||
|
||||
# S'assurer que le champ deposit_type est obligatoire pour les 2A+
|
||||
if "deposit_type" in form.fields:
|
||||
@@ -818,14 +820,6 @@ 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 not self.object.first_year and self.request.user.has_perm("wei.change_weiregistration_deposit_given") and self.object.deposit_type == 'check':
|
||||
form.fields["deposit_given"] = forms.BooleanField(
|
||||
required=False,
|
||||
initial=self.object.deposit_given,
|
||||
label=_("Deposit check given"),
|
||||
help_text=_("Tick if the deposit check has been given")
|
||||
)
|
||||
|
||||
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.")
|
||||
|
Reference in New Issue
Block a user