💄 use BootstrapSelect widget in update form

This commit is contained in:
krmax44 2022-11-28 16:57:36 +01:00 committed by Max
parent c28c12a66d
commit 2505abd66f

View file

@ -11,6 +11,8 @@ import bleach
from bleach.linkifier import Linker from bleach.linkifier import Linker
from tinymce.widgets import TinyMCE from tinymce.widgets import TinyMCE
from froide.helper.widgets import BootstrapSelect
from .models import GovernmentPlan, GovernmentPlanUpdate, PlanRating, PlanStatus from .models import GovernmentPlan, GovernmentPlanUpdate, PlanRating, PlanStatus
BLEACH_OPTIONS = { BLEACH_OPTIONS = {
@ -100,6 +102,7 @@ class GovernmentPlanUpdateProposalForm(forms.ModelForm):
help_text=_("Has the status of the plan changed?"), help_text=_("Has the status of the plan changed?"),
choices=[("", "---")] + PlanStatus.choices, choices=[("", "---")] + PlanStatus.choices,
required=False, required=False,
widget=BootstrapSelect,
) )
rating = forms.TypedChoiceField( rating = forms.TypedChoiceField(
label=_("rating"), label=_("rating"),
@ -108,6 +111,7 @@ class GovernmentPlanUpdateProposalForm(forms.ModelForm):
coerce=int, coerce=int,
empty_value=None, empty_value=None,
required=False, required=False,
widget=BootstrapSelect,
) )
class Meta: class Meta: