From b5635e276781810dc6ae0a608c64a00e4a951cbb Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 2 Oct 2020 10:29:22 +0100 Subject: tidying --- ctrack/register/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ctrack/register/forms.py') diff --git a/ctrack/register/forms.py b/ctrack/register/forms.py index ee50a71..999ed9f 100644 --- a/ctrack/register/forms.py +++ b/ctrack/register/forms.py @@ -5,7 +5,7 @@ from django.shortcuts import get_object_or_404 from django.urls import reverse from ctrack.organisations.models import Person, Organisation -from ctrack.register.models import EngagementEvent +from ctrack.register.models import EngagementEvent, EngagementType class EngagementEventCreateForm(forms.ModelForm): @@ -14,6 +14,7 @@ class EngagementEventCreateForm(forms.ModelForm): org = get_object_or_404(Organisation, slug=org_slug) cancel_redirect = reverse("core:home") self.fields["participants"].queryset = Person.objects.filter(organisation__slug=org_slug) + self.fields["type"].queryset = EngagementType.objects.all().order_by("descriptor") self.fields["related_caf"].queryset = org.caf_set.all() self.fields["related_caf"].label = "Related CAFs" self.helper = FormHelper(self) -- cgit v1.2.3