mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-25 07:02:22 +00:00
Organizers can add other organizers
This commit is contained in:
parent
6c064d6570
commit
a7665d41b7
@ -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>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user