Prettier templates
This commit is contained in:
parent
d98268d9d6
commit
7b1cb83742
33 changed files with 4207 additions and 4374 deletions
|
|
@ -1,146 +1,144 @@
|
|||
{% 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>
|
||||
<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 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">
|
||||
{% if Errors %}
|
||||
<div class="alert alert-danger">
|
||||
<ul class="m-0">
|
||||
{% for Error in Errors %}
|
||||
<li>{{ Error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<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="{{ Section.Name }}"
|
||||
autocomplete="off"
|
||||
autofocus
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<form id="section" 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="{{ Section.Name }}"
|
||||
autocomplete="off"
|
||||
autofocus
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="short_name" class="form-label col-md-2">
|
||||
Nom technique
|
||||
</label>
|
||||
<div class="col-md-10">
|
||||
<input
|
||||
id="short_name"
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="short_name"
|
||||
required
|
||||
value="{{ Section.ShortName }}"
|
||||
autocomplete="off"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="short_name" class="form-label col-md-2">
|
||||
Nom technique
|
||||
</label>
|
||||
<div class="col-md-10">
|
||||
<input
|
||||
id="short_name"
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="short_name"
|
||||
required
|
||||
value="{{ Section.ShortName }}"
|
||||
autocomplete="off"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="parent_section" class="form-label col-md-2">
|
||||
Section parente
|
||||
</label>
|
||||
<div class="col-md-10">
|
||||
<select
|
||||
id="parent_section"
|
||||
class="form-select"
|
||||
name="parent_section"
|
||||
autocomplete="off"
|
||||
{% if IsParent %}
|
||||
disabled
|
||||
{% endif %}
|
||||
>
|
||||
<option value="0">
|
||||
Choisir...
|
||||
</option>
|
||||
{% if !IsParent %}
|
||||
{% for ParentSection in Sections %}
|
||||
<option
|
||||
value="{{ ParentSection.ID }}"
|
||||
{% if Section.ParentSectionID == ParentSection.ID %}selected{% endif %}
|
||||
>
|
||||
{{ ParentSection.Name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="parent_section" class="form-label col-md-2">
|
||||
Section parente
|
||||
</label>
|
||||
<div class="col-md-10">
|
||||
<select
|
||||
id="parent_section"
|
||||
class="form-select"
|
||||
name="parent_section"
|
||||
autocomplete="off"
|
||||
{% if IsParent %}
|
||||
disabled
|
||||
{% endif %}
|
||||
>
|
||||
<option value="0">Choisir...</option>
|
||||
{% if !IsParent %}
|
||||
{% for ParentSection in Sections %}
|
||||
<option
|
||||
value="{{ ParentSection.ID }}"
|
||||
{% if Section.ParentSectionID == ParentSection.ID %}selected{% endif %}
|
||||
>
|
||||
{{ ParentSection.Name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-10 offset-md-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input me-2"
|
||||
id="contains_members"
|
||||
name="contains_members"
|
||||
autocomplete="off"
|
||||
{% if Section.ContainsMembers %}
|
||||
checked
|
||||
{% endif %}
|
||||
>
|
||||
<label for="contains_members" class="form-label">
|
||||
Contient des membres
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-10 offset-md-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input me-2"
|
||||
id="contains_members"
|
||||
name="contains_members"
|
||||
autocomplete="off"
|
||||
{% if Section.ContainsMembers %}
|
||||
checked
|
||||
{% endif %}
|
||||
/>
|
||||
<label for="contains_members" class="form-label">
|
||||
Contient des membres
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-10 offset-md-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input me-2"
|
||||
id="contains_contacts"
|
||||
name="contains_contacts"
|
||||
autocomplete="off"
|
||||
{% if Section.ContainsContacts %}
|
||||
checked
|
||||
{% endif %}
|
||||
>
|
||||
<label for="contains_contacts" class="form-label">
|
||||
Contient des contacts
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-10 offset-md-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input me-2"
|
||||
id="contains_contacts"
|
||||
name="contains_contacts"
|
||||
autocomplete="off"
|
||||
{% if Section.ContainsContacts %}
|
||||
checked
|
||||
{% endif %}
|
||||
/>
|
||||
<label for="contains_contacts" class="form-label">
|
||||
Contient des contacts
|
||||
</label>
|
||||
</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>
|
||||
<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 %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue