ynh_extension_meeo/templates/edu_controle.twig
2024-09-11 08:47:50 +02:00

64 lines
2.4 KiB
Twig

{{ include_javascript('tools/meeo/javascripts/edu_controle_filter.js') }}
<form class="form-horizontal" action="?api/meeo/controle" method="post">
<div class="form-group">
<label class="control-label col-sm-2" for="intitule">Intitulé:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="intitule" name="intitule" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="matiere">Matière:</label>
<div class="col-sm-10">
<select class="form-control" id="matiere" name="matiere" required>
{% for id, matiere in matieres %}
<option value="{{ id }}">{{ matiere }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="classe">Classe:</label>
<div class="col-sm-10">
<select class="form-control" id="classe" name="classe" required>
{% for id, classe in classes %}
<option value="{{ id }}" >{{ classe }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="max">Note max:</label>
<div class="col-sm-10">
<select class="form-control" id="max" name="max" required>
{% for id, note in notesMax %}
{% if (id == 20) %}
<option value="{{ id }}" selected>{{ note }}</option>
{% else %}
<option value="{{ id }}">{{ note }}</option>
{% endif %}
{% endfor %}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="coef">Coefficient:</label>
<div class="col-sm-10">
<input type="number" class="form-control" id="coef" name="coef" value="1" min="0.5" max="10" step="0.5">
</div>
</div>
<div>
<h2>Eleves</h2>
<div id="eleves" name="eleves">
{% for eleve in eleves %}
<div class="form-group" classe="{{ eleve.getClasse() }}">
<label class="control-label col-sm-2" for="eleve_{{ eleve.getId() }}">{{ eleve.getNom() }}</label>
<div class="col-sm-10">
<input type="number" class="form-control" id="eleve_{{ eleve.getId() }}" name="eleve_{{ eleve.getId() }}" min="0" max="20" step="0.1">
</div>
</div>
{% endfor %}
</div>
</div>
<button type="submit" class="btn btn-default">Envoyer</button>
</form>