Rework forms

This commit is contained in:
William Bouzourène 2025-01-12 17:14:39 +01:00
parent aa6d89aac8
commit efafb845f3
Signed by: bouzoure
SSH key fingerprint: SHA256:19MbXpLua4rUtk8tunMesD8KUKb91LXLHg8E/qTooww
14 changed files with 1539 additions and 679 deletions

View file

@ -32,45 +32,54 @@
<form id="section" method="post">
<div class="mb-3">
<label for="name" class="form-label">
<div class="row mb-3">
<label for="name" class="form-label col-md-2">
Nom
</label>
<input
id="name"
class="form-control"
type="text"
name="name"
required
value="{{ Section.Name }}"
>
<div class="col-md-10">
<input
id="name"
class="form-control"
type="text"
name="name"
required
value="{{ Section.Name }}"
>
</div>
</div>
<div class="mb-3">
<label for="short_name" class="form-label">
<div class="row mb-3">
<label for="short_name" class="form-label col-md-2">
Nom technique
</label>
<input
id="short_name"
class="form-control"
type="text"
name="short_name"
required
value="{{ Section.ShortName }}"
>
<div class="col-md-10">
<input
id="short_name"
class="form-control"
type="text"
name="short_name"
required
value="{{ Section.ShortName }}"
>
</div>
</div>
<div class="mb-3">
<label for="parent_section" class="form-label">
<div class="row mb-3">
<label for="parent_section" class="form-label col-md-2">
Section parente
</label>
<select
id="parent_section"
class="form-control"
name="parent_section"
{% if IsParent %}disabled{% endif %}
>
<option value="0">--- Pas de section parente ---</option>
<div class="col-md-10">
<select
id="parent_section"
class="form-control"
name="parent_section"
{% if IsParent %}
disabled
{% endif %}
>
<option value="0">
--- Pas de section parente ---
</option>
{% if !IsParent %}
{% for ParentSection in Sections %}
<option
@ -81,33 +90,42 @@
</option>
{% endfor %}
{% endif %}
</select>
</select>
</div>
</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 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"
{% if Section.ContainsMembers %}
checked
{% endif %}
>
<label for="contains_members" class="form-label">
Contient des membres
</label>
</div>
</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 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"
{% if Section.ContainsContacts %}
checked
{% endif %}
>
<label for="contains_contacts" class="form-label">
Contient des contacts
</label>
</div>
</div>
<div class="mt-3">