From b26882a450d85e9ca672b28dcc44a3b86c77f5e0 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 4 Jul 2020 15:02:21 +0200 Subject: [PATCH] flows: FlowStageBinding group Stage by type --- passbook/flows/forms.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/passbook/flows/forms.py b/passbook/flows/forms.py index 83c356bb9..7abfe2d30 100644 --- a/passbook/flows/forms.py +++ b/passbook/flows/forms.py @@ -3,7 +3,8 @@ from django import forms from django.utils.translation import gettext_lazy as _ -from passbook.flows.models import Flow, FlowStageBinding +from passbook.flows.models import Flow, FlowStageBinding, Stage +from passbook.lib.widgets import GroupedModelChoiceField class FlowForm(forms.ModelForm): @@ -35,6 +36,8 @@ class FlowForm(forms.ModelForm): class FlowStageBindingForm(forms.ModelForm): """FlowStageBinding Form""" + stage = GroupedModelChoiceField(queryset=Stage.objects.all().select_subclasses(),) + class Meta: model = FlowStageBinding