Display Creer absence
This commit is contained in:
parent
9561a365aa
commit
cf11cf2975
3 changed files with 53 additions and 0 deletions
19
actions/CreerAbsenceAction.php
Normal file
19
actions/CreerAbsenceAction.php
Normal 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()]);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,8 @@
|
||||||
label: MeeO # Nom affiché dans la barre d'action de l'éditeur
|
label: MeeO # Nom affiché dans la barre d'action de l'éditeur
|
||||||
actions:
|
actions:
|
||||||
|
creerabsence:
|
||||||
|
label: Creer Absence
|
||||||
|
description: Formulaire d'absence
|
||||||
absences:
|
absences:
|
||||||
label: Absences
|
label: Absences
|
||||||
description: Absences des élèves
|
description: Absences des élèves
|
||||||
|
|
31
templates/edu_creer_absence.twig
Normal file
31
templates/edu_creer_absence.twig
Normal 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>
|
Loading…
Reference in a new issue