1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-24 16:20:32 +02:00

Temporary disable payment form

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2024-02-11 23:51:33 +01:00
parent 2e574d0659
commit ece128836a
2 changed files with 3 additions and 47 deletions

View File

@ -456,8 +456,6 @@ class PaymentUpdateView(LoginRequiredMixin, UpdateView):
def get_form(self, form_class=None):
form = super().get_form(form_class)
if not self.request.user.registration.is_admin:
from django.forms.widgets import Select
widget: Select
form.fields["type"].widget.choices = list(form.fields["type"].widget.choices)[:-1]
del form.fields["valid"]
return form