Change information in Absence Form
This commit is contained in:
parent
6aea33d65a
commit
b4e4473603
2 changed files with 9 additions and 6 deletions
|
@ -54,10 +54,6 @@ class CreateFormsCommand extends Command
|
|||
|
||||
private function absencesForm(FormManager $formManager, $meeo_config)
|
||||
{
|
||||
$existingForm = $formManager->getOne($meeo_config['absences']['formId']);
|
||||
if ($existingForm)
|
||||
return false;
|
||||
|
||||
$data = [
|
||||
"bn_id_nature" => $meeo_config['absences']['formId'],
|
||||
"bn_label_nature" => "Absences",
|
||||
|
@ -69,7 +65,8 @@ class CreateFormsCommand extends Command
|
|||
"bn_template" => <<<EOT
|
||||
titre***Absence : {{bf_eleve}} - {{bf_date_debut_evenement}}***Titre Automatique***
|
||||
listefiche***5***Elève*** *** *** *** *** ***1*** *** *** * *** * *** *** *** ***
|
||||
listedatedeb***bf_date_debut_evenement***Date*** *** *** *** *** ***1*** *** *** * *** * *** *** *** ***
|
||||
listedatedeb***bf_date_debut***Debut*** *** ***today*** *** ***1*** *** *** * *** * *** *** *** ***
|
||||
listedatedeb***bf_date_fin***Fin*** *** ***today*** *** ***1*** *** *** * *** * *** *** *** ***
|
||||
textelong***bf_commentaire***Commentaire*** *** *** *** ***wiki***0*** *** *** * *** * *** *** *** ***
|
||||
EOT,
|
||||
"bn_ce_i18n" => "fr-FR",
|
||||
|
@ -77,6 +74,10 @@ EOT,
|
|||
"bn_only_one_entry_message" => null
|
||||
];
|
||||
|
||||
$existingForm = $formManager->getOne($meeo_config['absences']['formId']);
|
||||
if ($existingForm)
|
||||
return $formManager->update($data);
|
||||
|
||||
return $formManager->create($data);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
<div class="panel-body">
|
||||
{% for entry in entries %}
|
||||
<div>
|
||||
<h5>{{ entry['bf_date_debut_evenement'] }}</h5>
|
||||
<h5>{{ entry['bf_date_debut_evenement']|date("m/d/Y H:i") }} - {{ entry['bf_date_fin_evenement']|date("m/d/Y H:i") }}</h5>
|
||||
{% if entry['bf_commentaire']|default %}
|
||||
<p>{{ entry['bf_commentaire'] }}</p>
|
||||
{% else %}
|
||||
<p>Aucune information</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue