Commit 3d6868a5 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Usage de Zend\Element\Date pour les dates plutôt que celui d'app

parent 2a05bf9a
Loading
Loading
Loading
Loading
+1 −1
Changes for module/Application/src/Application/Form/AgentMissionSpecifique/AgentMissionSpecifiqueForm.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -3,9 +3,9 @@
namespace Application\Form\AgentMissionSpecifique;

use Application\Service\MissionSpecifique\MissionSpecifiqueServiceAwareTrait;
use UnicaenApp\Form\Element\Date;
use UnicaenApp\Form\Element\SearchAndSelect;
use Zend\Form\Element\Button;
use Zend\Form\Element\Date;
use Zend\Form\Element\Number;
use Zend\Form\Element\Select;
use Zend\Form\Form;
+4 −4
Changes for module/Application/src/Application/Form/AgentMissionSpecifique/AgentMissionSpecifiqueHydrator.php: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -24,8 +24,8 @@ class AgentMissionSpecifiqueHydrator implements HydratorInterface {
            'mission'   => ($object->getMission()?$object->getMission()->getId():null),
            'agent'     => ($object->getAgent())?['id' => $object->getAgent()->getId(), 'label' => $object->getAgent()->getDenomination()]:null,
            'structure' => ($object->getStructure())?['id' => $object->getStructure()->getId(), 'label' => $object->getStructure()->getLibelleLong()]:null,
            'debut'     => ($object->getDateDebut()?$object->getDateDebut()->format('d/m/Y'):null),
            'fin'       => ($object->getDateFin()?$object->getDateFin()->format('d/m/Y'):null),
            'debut'     => ($object->getDateDebut()?$object->getDateDebut()->format('Y-m-d'):null),
            'fin'       => ($object->getDateFin()?$object->getDateFin()->format('Y-m-d'):null),
            'decharge'  => ($object->getDecharge()?$object->getDecharge():null)
        ];
        return $data;
@@ -41,8 +41,8 @@ class AgentMissionSpecifiqueHydrator implements HydratorInterface {
        $mission = $this->getMissionSpecifiqueService()->getMissionSpecifique($data['mission']);
        $agent = $this->getAgentService()->getAgent($data['agent']['id']);
        $structure = $this->getStructureService()->getStructure($data['structure']['id']);
        $debut = ($data['debut']?DateTime::createFromFormat('d/m/Y', $data['debut']):null);
        $fin   = ($data['fin']?DateTime::createFromFormat('d/m/Y', $data['fin']):null);
        $debut = ($data['debut']?DateTime::createFromFormat('Y-m-d', $data['debut']):null);
        $fin   = ($data['fin']?DateTime::createFromFormat('Y-m-d', $data['fin']):null);
        $decharge   = (isset($data['decharge']) AND trim($data['decharge']) !== '')?$data['decharge']:null;

        $object->setAgent($agent);
+1 −3
Changes for module/Application/src/Application/Form/FicheProfil/FicheProfilForm.php: 1 added line, 3 removed lines.
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@ use Application\Service\Structure\StructureServiceAwareTrait;
use UnicaenUtilisateur\Entity\DateTimeAwareTrait;
use Zend\Form\Element\Button;
use Zend\Form\Element\Date;
use Zend\Form\Element\DateTime;
use Zend\Form\Element\Hidden;
use Zend\Form\Element\Select;
use Zend\Form\Element\Text;
@@ -73,11 +72,10 @@ class FicheProfilForm extends Form {
        ]);
        //date
        $this->add([
            'type' => DateTime::class,
            'type' => Date::class,
            'name' => 'date',
            'options' => [
                'label' => "Date de fin * :",
                'format' => 'd/m/Y',
            ],
            'attributes' => [
                'id' => 'date',
+2 −2
Changes for module/Application/src/Application/Form/FicheProfil/FicheProfilHydrator.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ class FicheProfilHydrator implements HydratorInterface {
            'structure'     => ($object->getStructure())?$object->getStructure()->getLibelleLong():null,
            'structure_id'     => ($object->getStructure())?$object->getStructure()->getId():null,
            'ficheposte'    => ($object->getFichePoste())?$object->getFichePoste()->getId():null,
            'date'          => ($object->getDate())?$object->getDate()->format('d/m/Y'):null,
            'date'          => ($object->getDate())?$object->getDate()->format('Y-m-d'):null,
            'lieu'          => $object->getLieu(),
            'contexte'      => $object->getContexte(),
            'mission'       => $object->getMission(),
@@ -43,7 +43,7 @@ class FicheProfilHydrator implements HydratorInterface {
    {
        $structure = (isset($data['structure_id']))?$this->getStructureService()->getStructure($data['structure_id']):null;
        $ficheposte = (isset($data['ficheposte']))?$this->getFichePosteService()->getFichePoste($data['ficheposte']):null;
        $date = (isset($data['date']))?DateTime::createFromFormat('d/m/Y', $data['date']):null;
        $date = (isset($data['date']))?DateTime::createFromFormat('Y-m-d', $data['date']):null;
        $lieu = (isset($data['lieu']) AND trim($data['lieu']) !== '')?trim($data['lieu']):null;
        $contexte = (isset($data['contexte']) AND trim($data['contexte']) !== '')?trim($data['contexte']):null;
        $mission = (isset($data['mission']) AND trim($data['mission']) !== '')?trim($data['mission']):null;
+1 −1
Changes for module/Application/src/Application/Service/Export/Formation/Emargement/emargement.phtml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ $formation = $journee->getInstance()->getFormation();
    Feuille d'émargement de la formation : <?php echo $formation->getLibelle(); ?>
</h1>
<h2>
    Journée du <?php echo $journee->getJour(); ?> du <?php echo $journee->getDebut(); ?> au <?php echo $journee->getFin(); ?>
    Journée du <?php echo $journee->getJour()->format('d/m/Y'); ?> du <?php echo $journee->getDebut(); ?> au <?php echo $journee->getFin(); ?>
</h2>


Loading