Organizers can add other organizers
This commit is contained in:
parent
6c064d6570
commit
a7665d41b7
|
@ -14,7 +14,9 @@
|
||||||
<form method="post">
|
<form method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form|crispy }}
|
{{ form|crispy }}
|
||||||
<div id="registration_form"></div>
|
<div id="registration_form">
|
||||||
|
{{ volunteer_registration_form|crispy }}
|
||||||
|
</div>
|
||||||
<button class="btn btn-success" type="submit">
|
<button class="btn btn-success" type="submit">
|
||||||
{% trans "Add organizer" %}
|
{% trans "Add organizer" %}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -97,7 +97,7 @@ class AddOrganizerView(VolunteerMixin, CreateView):
|
||||||
del context["admin_registration_form"].fields["email_confirmed"]
|
del context["admin_registration_form"].fields["email_confirmed"]
|
||||||
|
|
||||||
if not self.request.user.registration.is_admin:
|
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"]
|
del context["admin_registration_form"]
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
Loading…
Reference in New Issue