Remove ajax_select from trombi

This commit is contained in:
Antoine Bartuccio 2024-10-20 22:41:35 +02:00
parent a21460a1b8
commit d9ea5e5538

View File

@ -24,7 +24,6 @@
from datetime import date from datetime import date
from ajax_select.fields import AutoCompleteSelectField
from django import forms from django import forms
from django.conf import settings from django.conf import settings
from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.mixins import LoginRequiredMixin
@ -49,6 +48,7 @@ from core.views import (
TabedViewMixin, TabedViewMixin,
) )
from core.views.forms import SelectDate from core.views.forms import SelectDate
from core.views.widgets.select import AutoCompleteSelectUser
from trombi.models import Trombi, TrombiClubMembership, TrombiComment, TrombiUser from trombi.models import Trombi, TrombiClubMembership, TrombiComment, TrombiUser
@ -147,8 +147,12 @@ class TrombiEditView(CanEditPropMixin, TrombiTabsMixin, UpdateView):
class AddUserForm(forms.Form): class AddUserForm(forms.Form):
user = AutoCompleteSelectField( user = forms.ModelChoiceField(
"users", required=True, label=_("Select user"), help_text=None label=_("Select user"),
help_text=None,
required=True,
widget=AutoCompleteSelectUser,
queryset=User.objects.all(),
) )