2024-07-12 16:40:46 +02:00
|
|
|
{% extends "sco_page.j2" %}
|
|
|
|
{% import 'wtf.j2' as wtf %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block styles %}
|
|
|
|
{{super()}}
|
2024-07-31 13:40:30 +02:00
|
|
|
<link rel="stylesheet" href="{{scu.STATIC_DIR}}/libjs/bootstrap/css/bootstrap.min.css">
|
2024-07-12 16:40:46 +02:00
|
|
|
|
|
|
|
<style>
|
|
|
|
div{
|
|
|
|
margin-bottom: 8px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block app_content %}
|
|
|
|
|
|
|
|
<h2>Préparation de la feuille d'émargement : <span style="color:crimson">{{group_name}}</span></h2>
|
|
|
|
|
|
|
|
<div class="scobox">
|
2024-08-23 17:59:55 +02:00
|
|
|
<form
|
|
|
|
id="feuille_emargement"
|
|
|
|
action="{{request.base_url}}"
|
|
|
|
method="post"
|
|
|
|
onsubmit="serializeGroupIds(event)"
|
|
|
|
>
|
|
|
|
{{ form.hidden_tag() }}
|
2024-07-12 16:40:46 +02:00
|
|
|
<div class="infos-button">Groupes : {{grp|safe}}</div>
|
|
|
|
|
|
|
|
<div class="part">
|
|
|
|
{{ form.discipline.label }}
|
|
|
|
{{ form.discipline() }}
|
|
|
|
</div>
|
|
|
|
<div class="part">
|
|
|
|
{{ form.ens.label }}
|
|
|
|
{{ form.ens() }}
|
|
|
|
</div>
|
|
|
|
<div class="part">
|
|
|
|
{{ form.date.label }}
|
|
|
|
{{ form.date() }}
|
|
|
|
</div>
|
|
|
|
<div class="part">
|
|
|
|
{{ form.heure.label }}
|
|
|
|
{{ form.heure() }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{form.submit()}}
|
|
|
|
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock app_content %}
|
|
|
|
{% block scripts %}
|
|
|
|
{{super()}}
|
|
|
|
{% include "sco_timepicker.j2" %}
|
|
|
|
<script src="{{scu.STATIC_DIR}}/js/groups_view.js"></script>
|
|
|
|
<script src="{{scu.STATIC_DIR}}/libjs/purl.js"></script>
|
2024-08-23 17:59:55 +02:00
|
|
|
<script>
|
|
|
|
function serializeGroupIds(event) {
|
|
|
|
// Dealing with multiselect
|
|
|
|
event.preventDefault();
|
|
|
|
var form = document.getElementById("feuille_emargement");
|
|
|
|
var groupIdsField = form.elements["group_ids"];
|
|
|
|
|
|
|
|
// Check if the group_ids field exists and is an array
|
|
|
|
if (groupIdsField && Array.isArray(groupIdsField.value)) {
|
|
|
|
// Convert the array to a comma-separated string
|
|
|
|
var serializedValue = groupIdsField.value.join(',');
|
|
|
|
|
|
|
|
// Replace the field's value with the serialized string
|
|
|
|
groupIdsField.value = serializedValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Now submit the form
|
|
|
|
form.submit();
|
|
|
|
}
|
|
|
|
</script>
|
2024-07-12 16:40:46 +02:00
|
|
|
{% endblock scripts %}
|