Rework forms
This commit is contained in:
parent
aa6d89aac8
commit
efafb845f3
14 changed files with 1539 additions and 679 deletions
|
|
@ -27,52 +27,40 @@
|
|||
|
||||
<form id="user" method="post">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Section</th>
|
||||
<th>Rôle</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for Section in Sections %}
|
||||
<tr>
|
||||
<td>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
readonly
|
||||
value="{{ Section.Name }}"
|
||||
>
|
||||
</td>
|
||||
<td>
|
||||
<select
|
||||
class="form-control"
|
||||
name="section-{{ Section.ID }}"
|
||||
id="section-{{ Section.ID }}"
|
||||
>
|
||||
<option value="0">--- Aucun ---</option>
|
||||
{% for Role in Roles %}
|
||||
<option
|
||||
value="{{ Role.ID }}"
|
||||
{% for Section in Sections %}
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-2">
|
||||
{{ Section.Name }}
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">
|
||||
<i class="bi-key"></i>
|
||||
</span>
|
||||
<select
|
||||
class="form-control"
|
||||
name="section-{{ Section.ID }}"
|
||||
id="section-{{ Section.ID }}"
|
||||
>
|
||||
<option value="0">--- Aucun ---</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>
|
||||
{% for UserRole in UserRoles %}
|
||||
{% if Section.ID == UserRole.SectionID and Role.ID == UserRole.RoleID %}
|
||||
selected
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
>
|
||||
{{ Role.Name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<div class="mt-3">
|
||||
<button class="btn btn-primary" type="submit">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue