aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-05 10:53:31 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-05 10:53:31 +0100
commit22d18014f0d9913abf27c5eac38a727d919608e1 (patch)
tree53f8069f793be045eeb4b9e8f8bf0b710b1acfaa /ctrack
parent04e8fa22dc488cb03a0c1ac3013bf65ebe0aac0e (diff)
fixed cancel button redirects
Diffstat (limited to 'ctrack')
-rw-r--r--ctrack/register/forms.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctrack/register/forms.py b/ctrack/register/forms.py
index 4f91bd8..2fc5ff1 100644
--- a/ctrack/register/forms.py
+++ b/ctrack/register/forms.py
@@ -14,7 +14,7 @@ class EngagementEventCreateForm(forms.ModelForm):
super().__init__(*args, **kwargs)
if caf:
org = CAF.objects.get(pk=caf).organisation
- cancel_redirect = reverse("core:home")
+ cancel_redirect = reverse("caf:detail", args=[caf])
self.fields["related_caf"].initial = caf
self.fields["participants"].queryset = Person.objects.filter(organisation__pk=org.pk)
self.fields["type"].queryset = EngagementType.objects.all().order_by("descriptor")
@@ -44,7 +44,7 @@ class EngagementEventCreateForm(forms.ModelForm):
)
else:
org = get_object_or_404(Organisation, slug=org_slug)
- cancel_redirect = reverse("core:home")
+ cancel_redirect = reverse("organisations:detail", args=[org_slug])
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()