FossilRepo

fossilrepo / templates / organization / role_confirm_delete.html
Source Blame History 49 lines
c588255… ragelink 1 {% extends "base.html" %}
c588255… ragelink 2 {% block title %}Delete {{ role.name }} — Fossilrepo{% endblock %}
c588255… ragelink 3
c588255… ragelink 4 {% block content %}
c588255… ragelink 5 <div class="mb-6">
c588255… ragelink 6 <a href="{% url 'organization:role_detail' slug=role.slug %}" class="text-sm text-brand-light hover:text-brand">&larr; Back to {{ role.name }}</a>
c588255… ragelink 7 </div>
c588255… ragelink 8
c588255… ragelink 9 <div class="mx-auto max-w-lg">
c588255… ragelink 10 <div class="rounded-lg bg-gray-800 p-6 shadow border border-gray-700">
c588255… ragelink 11 <h2 class="text-lg font-semibold text-gray-100">Delete Role</h2>
c588255… ragelink 12
c588255… ragelink 13 {% if active_members.exists %}
c588255… ragelink 14 <div class="mt-4 rounded-md bg-yellow-900/50 border border-yellow-700 p-4">
c588255… ragelink 15 <p class="text-sm text-yellow-300">
c588255… ragelink 16 This role has <strong>{{ active_members.count }}</strong> active member{{ active_members.count|pluralize }}.
c588255… ragelink 17 You must reassign them to another role before deleting.
c588255… ragelink 18 </p>
c588255… ragelink 19 <ul class="mt-2 text-sm text-yellow-300 list-disc list-inside">
c588255… ragelink 20 {% for membership in active_members %}
c588255… ragelink 21 <li>{{ membership.member.username }}</li>
c588255… ragelink 22 {% endfor %}
c588255… ragelink 23 </ul>
c588255… ragelink 24 </div>
c588255… ragelink 25 <div class="mt-6 flex justify-end">
c588255… ragelink 26 <a href="{% url 'organization:role_detail' slug=role.slug %}"
c588255… ragelink 27 class="rounded-md bg-gray-700 px-4 py-2 text-sm font-semibold text-gray-100 shadow-sm ring-1 ring-inset ring-gray-600 hover:bg-gray-600">
c588255… ragelink 28 Go Back
c588255… ragelink 29 </a>
c588255… ragelink 30 </div>
c588255… ragelink 31 {% else %}
c588255… ragelink 32 <p class="mt-2 text-sm text-gray-400">
c588255… ragelink 33 Are you sure you want to delete <strong class="text-gray-100">{{ role.name }}</strong>? This action uses soft delete -- the record will be marked as deleted but can be recovered.
c588255… ragelink 34 </p>
c588255… ragelink 35 <form method="post" class="mt-6 flex justify-end gap-3">
c588255… ragelink 36 {% csrf_token %}
c588255… ragelink 37 <a href="{% url 'organization:role_detail' slug=role.slug %}"
c588255… ragelink 38 class="rounded-md bg-gray-700 px-4 py-2 text-sm font-semibold text-gray-100 shadow-sm ring-1 ring-inset ring-gray-600 hover:bg-gray-600">
c588255… ragelink 39 Cancel
c588255… ragelink 40 </a>
c588255… ragelink 41 <button type="submit"
c588255… ragelink 42 class="rounded-md bg-red-600 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500">
c588255… ragelink 43 Delete
c588255… ragelink 44 </button>
c588255… ragelink 45 </form>
c588255… ragelink 46 {% endif %}
c588255… ragelink 47 </div>
c588255… ragelink 48 </div>
c588255… ragelink 49 {% endblock %}

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button