pop-camarades/views/role_form.html

278 lines
8.5 KiB
HTML

{% extends "layouts/main.html" %}
{% block main %}
<div class="container mt-4">
<div class="mb-4">
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Accueil</a></li>
<li class="breadcrumb-item"><a href="/admin">Administration</a></li>
<li class="breadcrumb-item"><a href="/admin/roles">Rôles</a></li>
{% if Role.ID %}
<li class="breadcrumb-item">
<a href="/admin/roles/{{ Role.ID }}">{{ Role.Name }}</a>
</li>
<li class="breadcrumb-item active">Modifier</li>
{% else %}
<li class="breadcrumb-item active">Ajouter</li>
{% endif %}
</ol>
</nav>
<hr />
</div>
{% if Errors %}
<div class="alert alert-danger">
<ul class="m-0">
{% for Error in Errors %}
<li>{{ Error }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
<form id="role" method="post">
<div class="row mb-3">
<label for="name" class="form-label col-md-2"> Nom </label>
<div class="col-md-10">
<input
id="name"
class="form-control"
type="text"
name="name"
required
value="{{ Role.Name }}"
autocomplete="off"
autofocus
/>
</div>
</div>
<div class="row mb-3">
<div class="col-md-2">
<div class="mb-2">Permissions membres</div>
</div>
<div class="col-md-10">
<div class="mb-1">
<input
type="checkbox"
class="form-check-input me-2"
id="show_member"
name="show_member"
autocomplete="off"
{% if Role.ShowMember %}checked{% endif %}
/>
<label for="show_member" class="form-label"> Afficher </label>
</div>
<div class="mb-1">
<input
type="checkbox"
class="form-check-input me-2"
id="create_member"
name="create_member"
autocomplete="off"
{% if Role.CreateMember %}checked{% endif %}
/>
<label for="create_member" class="form-label"> Créer </label>
</div>
<div class="mb-1">
<input
type="checkbox"
class="form-check-input me-2"
id="edit_member"
name="edit_member"
autocomplete="off"
{% if Role.EditMember %}checked{% endif %}
/>
<label for="edit_member" class="form-label"> Modifier </label>
</div>
<div class="mb-1">
<input
type="checkbox"
class="form-check-input me-2"
id="show_archived_member"
name="show_archived_member"
autocomplete="off"
{% if Role.ShowArchivedMember %}checked{% endif %}
/>
<label for="show_archived_member" class="form-label">
Afficher archivés
</label>
</div>
<div class="mb-1">
<input
type="checkbox"
class="form-check-input me-2"
id="archive_member"
name="archive_member"
autocomplete="off"
{% if Role.ArchiveMember %}checked{% endif %}
/>
<label for="archive_member" class="form-label"> Archiver </label>
</div>
<div class="mb-1">
<input
type="checkbox"
class="form-check-input me-2"
id="restore_member"
name="restore_member"
autocomplete="off"
{% if Role.RestoreMember %}checked{% endif %}
/>
<label for="restore_member" class="form-label"> Restaurer </label>
</div>
<div class="mb-1">
<input
type="checkbox"
class="form-check-input me-2"
id="purge_member"
name="purge_member"
autocomplete="off"
{% if Role.PurgeMember %}checked{% endif %}
/>
<label for="purge_member" class="form-label">
Purger (suppression définitive)
</label>
</div>
<div class="mb-1">
<input
type="checkbox"
class="form-check-input me-2"
id="convert_member_to_contact"
name="convert_member_to_contact"
autocomplete="off"
{% if Role.ConvertMemberToContact %}checked{% endif %}
/>
<label for="convert_member_to_contact" class="form-label">
Convertir en contacts
</label>
</div>
</div>
</div>
<div class="row mb-3">
<div class="col-md-2">
<div class="mb-2">Permissions contacts</div>
</div>
<div class="col-md-10">
<div class="mb-1">
<input
type="checkbox"
class="form-check-input me-2"
id="show_contact"
name="show_contact"
autocomplete="off"
{% if Role.ShowContact %}checked{% endif %}
/>
<label for="show_contact" class="form-label"> Afficher </label>
</div>
<div class="mb-1">
<input
type="checkbox"
class="form-check-input me-2"
id="create_contact"
name="create_contact"
autocomplete="off"
{% if Role.CreateContact %}checked{% endif %}
/>
<label for="create_contact" class="form-label"> Créer </label>
</div>
<div class="mb-1">
<input
type="checkbox"
class="form-check-input me-2"
id="edit_contact"
name="edit_contact"
autocomplete="off"
{% if Role.EditContact %}checked{% endif %}
/>
<label for="edit_contact" class="form-label"> Modifier </label>
</div>
<div class="mb-1">
<input
type="checkbox"
class="form-check-input me-2"
id="show_archived_contact"
name="show_archived_contact"
autocomplete="off"
{% if Role.ShowArchivedContact %}checked{% endif %}
/>
<label for="show_archived_contact" class="form-label">
Afficher archivés
</label>
</div>
<div class="mb-1">
<input
type="checkbox"
class="form-check-input me-2"
id="archive_contact"
name="archive_contact"
autocomplete="off"
{% if Role.ArchiveContact %}checked{% endif %}
/>
<label for="archive_contact" class="form-label"> Archiver </label>
</div>
<div class="mb-1">
<input
type="checkbox"
class="form-check-input me-2"
id="restore_contact"
name="restore_contact"
autocomplete="off"
{% if Role.RestoreContact %}checked{% endif %}
/>
<label for="restore_contact" class="form-label"> Restaurer </label>
</div>
<div class="mb-1">
<input
type="checkbox"
class="form-check-input me-2"
id="purge_contact"
name="purge_contact"
autocomplete="off"
{% if Role.PurgeContact %}checked{% endif %}
/>
<label for="purge_contact" class="form-label">
Purger (suppression définitive)
</label>
</div>
<div class="mb-1">
<input
type="checkbox"
class="form-check-input me-2"
id="convert_contact_to_member"
name="convert_contact_to_member"
autocomplete="off"
{% if Role.ConvertContactToMember %}checked{% endif %}
/>
<label for="convert_contact_to_member" class="form-label">
Convertir en membres
</label>
</div>
</div>
</div>
<div class="my-4">
<button class="btn btn-outline-primary" type="submit">
<i class="me-1 bi-floppy"></i>
Enregistrer
</button>
</div>
</form>
</div>
{% endblock %}