Display Creer absence

This commit is contained in:
mckmonster 2024-07-28 10:56:33 +02:00
parent 9561a365aa
commit cf11cf2975
3 changed files with 53 additions and 0 deletions

View file

@ -0,0 +1,19 @@
<?php
use YesWiki\Core\YesWikiAction;
use YesWiki\Meeo\Service\EleveManager;
class CreerAbsenceAction extends YesWikiAction
{
public function formatArguments($arg)
{
return [];
}
public function run()
{
$eleveManager = $this->getService(EleveManager::class);
return $this->render('@meeo/edu_creer_absence.twig', ['eleves' => $eleveManager->getAll()]);
}
}

View file

@ -1,5 +1,8 @@
label: MeeO # Nom affiché dans la barre d'action de l'éditeur
actions:
creerabsence:
label: Creer Absence
description: Formulaire d'absence
absences:
label: Absences
description: Absences des élèves

View file

@ -0,0 +1,31 @@
<form class="form-horizontal" action="" method="post">
<div class="form-group">
<label class="control-label col-sm-2" for="eleve">Eleve:</label>
<div class="col-sm-10">
<select class="form-control" id="eleve" name="eleve" required>
{% for eleve in eleves %}
<option value="{{ eleve.getId() }}">{{ eleve.getNom() }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="date_debut_absence">Debut:</label>
<div class="col-sm-10">
<input class="form-control" type="datetime-local" id="date_debut_absence" name"date_debut_absence" required/>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="date_fin_absence">Fin:</label>
<div class="col-sm-10">
<input class="form-control" type="datetime-local" id="date_fin_absence" name"date_fin_absence"/>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="commentaire">Justification:</label>
<div class="col-sm-10">
<input class="form-control" type="textarea" id="commentaire" name"commentaire"/>
</div>
</div>
<button type="submit" class="btn btn-default">Envoyer</button>
</div></form>