Autoformat HTML templates
This commit is contained in:
parent
61ef08f6ec
commit
432ed6943f
16 changed files with 1779 additions and 1587 deletions
|
|
@ -20,59 +20,59 @@
|
|||
</div>
|
||||
|
||||
{% if Sections %}
|
||||
<form id="user" method="post" class="mw-1200">
|
||||
{% if Errors %}
|
||||
<div class="alert alert-danger">
|
||||
<ul class="m-0">
|
||||
{% for Error in Errors %}
|
||||
<li>{{ Error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
<form id="user" method="post" class="mw-1200">
|
||||
{% if Errors %}
|
||||
<div class="alert alert-danger">
|
||||
<ul class="m-0">
|
||||
{% for Error in Errors %}
|
||||
<li>{{ Error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% for Section in Sections %}
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-2 col-xl-3">{{ Section.Name }}</div>
|
||||
<div class="col">
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">
|
||||
<i class="bi-key"></i>
|
||||
</span>
|
||||
<select
|
||||
class="form-select"
|
||||
name="section-{{ Section.ID }}"
|
||||
id="section-{{ Section.ID }}"
|
||||
autocomplete="off"
|
||||
>
|
||||
<option value="0">Choisir...</option>
|
||||
{% for Role in Roles %}
|
||||
<option
|
||||
value="{{ Role.ID }}"
|
||||
{% for UserRole in UserRoles %}
|
||||
{% if Section.ID == UserRole.SectionID and Role.ID == UserRole.RoleID %}
|
||||
selected
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
>
|
||||
{{ Role.Name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% for Section in Sections %}
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-2 col-xl-3">{{ Section.Name }}</div>
|
||||
<div class="col">
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">
|
||||
<i class="bi-key"></i>
|
||||
</span>
|
||||
<select
|
||||
class="form-select"
|
||||
name="section-{{ Section.ID }}"
|
||||
id="section-{{ Section.ID }}"
|
||||
autocomplete="off"
|
||||
>
|
||||
<option value="0">Choisir...</option>
|
||||
{% for Role in Roles %}
|
||||
<option
|
||||
value="{{ Role.ID }}"
|
||||
{% for UserRole in UserRoles %}
|
||||
{% if Section.ID == UserRole.SectionID and Role.ID == UserRole.RoleID %}
|
||||
selected
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
>
|
||||
{{ Role.Name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<div class="my-4">
|
||||
<button class="btn btn-outline-primary" type="submit">
|
||||
<i class="me-1 bi-floppy"></i>
|
||||
Enregistrer
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="my-4">
|
||||
<button class="btn btn-outline-primary" type="submit">
|
||||
<i class="me-1 bi-floppy"></i>
|
||||
Enregistrer
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
<div class="my-4">Pas de section pour le moment</div>
|
||||
<div class="my-4">Pas de section pour le moment</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue