Gestion des sections
This commit is contained in:
parent
455930b4c2
commit
f7c8fa4539
5 changed files with 498 additions and 0 deletions
119
views/section_form.html
Normal file
119
views/section_form.html
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
{% 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/sections">Sections</a></li>
|
||||
|
||||
{% if Section.ID %}
|
||||
<li class="breadcrumb-item"><a href="/admin/sections/{{ Section.ID }}">{{ Section.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="section" method="post">
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">
|
||||
Nom
|
||||
</label>
|
||||
<input
|
||||
id="name"
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="name"
|
||||
required
|
||||
value="{{ Section.Name }}"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="short_name" class="form-label">
|
||||
Nom technique
|
||||
</label>
|
||||
<input
|
||||
id="short_name"
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="short_name"
|
||||
required
|
||||
value="{{ Section.ShortName }}"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="parent_section" class="form-label">
|
||||
Section parente
|
||||
</label>
|
||||
<select
|
||||
id="parent_section"
|
||||
class="form-control"
|
||||
name="parent_section"
|
||||
>
|
||||
<option value="0">--- Pas de section parente ---</option>
|
||||
{% for ParentSection in Sections %}
|
||||
<option
|
||||
value="{{ ParentSection.ID }}"
|
||||
{% if Section.ParentSectionID == ParentSection.ID %}selected{% endif %}
|
||||
>
|
||||
{{ ParentSection.Name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input me-2"
|
||||
id="contains_members"
|
||||
name="contains_members"
|
||||
{% if Section.ContainsMembers %}checked{% endif %}
|
||||
>
|
||||
<label for="contains_members" class="form-label">
|
||||
Contient des membres
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input me-2"
|
||||
id="contains_contacts"
|
||||
name="contains_contacts"
|
||||
{% if Section.ContainsContacts %}checked{% endif %}
|
||||
>
|
||||
<label for="contains_contacts" class="form-label">
|
||||
Contient des contacts
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<button class="btn btn-primary" type="submit">
|
||||
<i class="me-1" data-feather="save"></i>
|
||||
Enregistrer
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue