Organizers can add other organizers

This commit is contained in:
ynerant 2021-02-16 10:58:14 +01:00
parent 6c064d6570
commit a7665d41b7
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
2 changed files with 4 additions and 2 deletions

View File

@ -14,7 +14,9 @@
<form method="post">
{% csrf_token %}
{{ form|crispy }}
<div id="registration_form"></div>
<div id="registration_form">
{{ volunteer_registration_form|crispy }}
</div>
<button class="btn btn-success" type="submit">
{% trans "Add organizer" %}
</button>

View File

@ -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