From 2505abd66ff9227a7fd013bbccb3d07022fab561 Mon Sep 17 00:00:00 2001 From: krmax44 Date: Mon, 28 Nov 2022 16:57:36 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20use=20`BootstrapSelect`=20widget?= =?UTF-8?q?=20in=20update=20form?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- froide_govplan/forms.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/froide_govplan/forms.py b/froide_govplan/forms.py index f0212fc..d2aa6b1 100644 --- a/froide_govplan/forms.py +++ b/froide_govplan/forms.py @@ -11,6 +11,8 @@ import bleach from bleach.linkifier import Linker from tinymce.widgets import TinyMCE +from froide.helper.widgets import BootstrapSelect + from .models import GovernmentPlan, GovernmentPlanUpdate, PlanRating, PlanStatus BLEACH_OPTIONS = { @@ -100,6 +102,7 @@ class GovernmentPlanUpdateProposalForm(forms.ModelForm): help_text=_("Has the status of the plan changed?"), choices=[("", "---")] + PlanStatus.choices, required=False, + widget=BootstrapSelect, ) rating = forms.TypedChoiceField( label=_("rating"), @@ -108,6 +111,7 @@ class GovernmentPlanUpdateProposalForm(forms.ModelForm): coerce=int, empty_value=None, required=False, + widget=BootstrapSelect, ) class Meta: