From a7665d41b76a9957da88c07758b147264f56a857 Mon Sep 17 00:00:00 2001 From: ynerant Date: Tue, 16 Feb 2021 10:58:14 +0100 Subject: [PATCH] Organizers can add other organizers --- apps/registration/templates/registration/add_organizer.html | 4 +++- apps/registration/views.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/registration/templates/registration/add_organizer.html b/apps/registration/templates/registration/add_organizer.html index aee2ffd..e642d59 100644 --- a/apps/registration/templates/registration/add_organizer.html +++ b/apps/registration/templates/registration/add_organizer.html @@ -14,7 +14,9 @@
{% csrf_token %} {{ form|crispy }} -
+
+ {{ volunteer_registration_form|crispy }} +
diff --git a/apps/registration/views.py b/apps/registration/views.py index 76418d4..bab5fc1 100644 --- a/apps/registration/views.py +++ b/apps/registration/views.py @@ -97,7 +97,7 @@ class AddOrganizerView(VolunteerMixin, CreateView): del context["admin_registration_form"].fields["email_confirmed"] if not self.request.user.registration.is_admin: - del context["form"].fields["type"] + context["form"].fields["type"].widget.attrs['readonly'] = True del context["admin_registration_form"] return context