{% load lucide ui %} {% comment %} Club-scoped admins, and the modals to add one / confirm removing one. Included with `club`, `admins`, `admin_form` already in context. {% endcomment %}
Club admins
{% for role in admins %} {% empty %} {% endfor %}
Name Email
{{ role.member }} {{ role.member.user.email|default:"—" }}
No admins yet.
{% url 'controlpanel:club_admin_add' club.pk as club_admin_add_url %} {% include "controlpanel/_modal_form.html" with modal_id="club_admin_add_modal" title="Add admin" form=admin_form action_url=club_admin_add_url submit_label="Grant admin" submit_icon="user-plus" blurb="A club admin can manage everything in this club. They will be required to set up two-factor authentication before they can sign in." %} {% comment %} Dialogs live outside the table: may only contain elements. {% endcomment %} {% for role in admins %} {% url 'controlpanel:club_admin_remove' club.pk role.pk as admin_remove_url %} {% include "controlpanel/_confirm_modal.html" with modal_id=role.pk|dom_id:"admin_remove_modal" title="Remove admin" body="Remove "|add:role.member.get_full_name|add:" as an admin of this club? They keep their membership — only admin rights are revoked." action_url=admin_remove_url submit_label="Remove" %} {% endfor %}