diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-02 10:29:22 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-02 10:29:22 +0100 |
commit | b5635e276781810dc6ae0a608c64a00e4a951cbb (patch) | |
tree | 6c5de6ca3a1aac2ba6f56cfffd07fe5efdd3409a /ctrack/register/forms.py | |
parent | c3fd7a10d270d408b7661501c3c3023d602f7054 (diff) |
tidying
Diffstat (limited to '')
-rw-r--r-- | ctrack/register/forms.py | 3 |
1 files changed, 2 insertions, 1 deletions
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) |