Commit 948b8435 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Ajout des derniers champs au form intervenant, maj uimport

parent ff7a153f
Loading
Loading
Loading
Loading
+1 −1
Changes for composer.json: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
        "unicaen/bjy-authorize"  : "3.0.4",
        "zendframework/zend-file": "2.8.3",
        "unicaen/code"           : "3.0.2",
        "unicaen/import"         : "3.1.3",
        "unicaen/import"         : "3.1.4",
        "unicaen/tbl"            : "4.1",
        "unicaen/open-document"  : "3.0.2",
        "ocramius/proxy-manager" : "2.2.3"
+4 −4
Changes for composer.lock: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
        "This file is @generated automatically"
    ],
    "content-hash": "ce8809a17b6adc8c21421b95722ba5e4",
    "content-hash": "322c46c5ae38cbb95f7c4a48767ee989",
    "packages": [
        {
            "name": "beberlei/assert",
@@ -2772,11 +2772,11 @@
        },
        {
            "name": "unicaen/import",
            "version": "3.1.3",
            "version": "3.1.4",
            "source": {
                "type": "git",
                "url": "https://git.unicaen.fr/lib/unicaen/import.git",
                "reference": "348fb92c5ec224a3c1da425af58859be0a56d8f0"
                "reference": "83a793dac92c0c9dba4e7f36e5a065abc2aafe99"
            },
            "require": {
                "unicaen/auth": "dev-zf-3.x || ^3.0",
@@ -2796,7 +2796,7 @@
                ]
            },
            "description": "Module d'import de données vers une base Oracle",
            "time": "2021-02-16T09:36:36+00:00"
            "time": "2021-02-17T10:47:54+00:00"
        },
        {
            "name": "unicaen/open-document",
+53 −0
Changes for module/Application/src/Application/Form/Intervenant/EditionForm.php: 53 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -56,12 +56,15 @@ class EditionForm extends AbstractForm
        'discipline'         => ['type' => Discipline::class],
        'grade'              => ['type' => Grade::class],
        'code'               => ['type' => 'string'],
        'codeRh'             => ['type' => 'string'],
        'utilisateurCode'    => ['type' => 'string'],
        'source'             => ['type' => Source::class],
        'sourceCode'         => ['type' => 'string'],
        'syncStatut'         => ['type' => 'bool'],
        'syncStructure'      => ['type' => 'bool'],
        'montantIndemniteFc' => ['type' => 'float'],
        'validiteDebut'      => ['type' => \DateTime::class],
        'validiteFin'        => ['type' => \DateTime::class],
    ];

    protected $readOnly         = false;
@@ -206,6 +209,14 @@ class EditionForm extends AbstractForm
            ],
        ]);

        $this->add([
            'name'    => 'codeRh',
            'type'    => 'Text',
            'options' => [
                'label' => 'Code RH éventuel',
            ],
        ]);

        $utilisateur = new SearchAndSelect('utilisateur');
        $utilisateur->setRequired(false)
            ->setSelectionRequired(false)
@@ -268,6 +279,45 @@ class EditionForm extends AbstractForm
            ],
        ]);

        $this->add([
            'name'       => 'validiteDebut',
            'type'       => 'DateTime',
            'options'    => [
                'label'  => 'Début de validité',
                'format' => Util::DATE_FORMAT,
            ],
            'attributes' => [
                'placeholder' => "jj/mm/aaaa",
            ],
        ]);

        $this->add([
            'name'       => 'validiteFin',
            'type'       => 'DateTime',
            'options'    => [
                'label'  => 'Fin de validité',
                'format' => Util::DATE_FORMAT,
            ],
            'attributes' => [
                'placeholder' => "jj/mm/aaaa",
            ],
        ]);

        $this->add([
            'name'       => 'dateNaissance',
            'type'       => 'DateTime',
            'options'    => [
                'label'         => 'Date de naissance <span class="text-danger">*</span>',
                'format'        => Util::DATE_FORMAT,
                'label_options' => [
                    'disable_html_escape' => true,
                ],
            ],
            'attributes' => [
                'placeholder' => "jj/mm/aaaa",
            ],
        ]);

        $this->add([
            'name'       => 'syncStatut',
            'options'    => [
@@ -470,8 +520,11 @@ class EditionForm extends AbstractForm
            'discipline'         => ['required' => false],
            'grade'              => ['required' => false],
            'code'               => ['required' => true],
            'codeRh'             => ['required' => false],
            'utilisateur'        => ['required' => false],
            'login'              => ['required' => false],
            'validiteDebut'      => ['required' => false],
            'validiteFin'        => ['required' => false],
            'password'           => [
                'required'   => false,
                'validators' => [
+1 −1
Changes for module/Application/src/Application/Hydrator/GenericHydrator.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ class GenericHydrator implements HydratorInterface
                }
                if (\DateTime::class == $type) {
                    $value = \DateTime::createFromFormat(Constants::DATE_FORMAT, $value);
                    $value->setTime(0, 0, 0);
                    if ($value) $value->setTime(0, 0, 0);
                    if (!$value) $value = null;
                }
                if (class_exists($type) && $this->isEntity($type) && $value) {
+28 −7
Changes for module/Application/view/application/intervenant/saisir.phtml: 28 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -25,14 +25,31 @@ if ($errors) {
    <div class="row">
        <div class="col-md-6">
            <div class="panel panel-default">
                <div class="panel-heading">Données indispensables</div>
                <div class="panel-heading">Données essentielles</div>
                <div class="panel-body">
                    <?php
                    echo $this->formControlGroup($form->get('nomUsuel'));
                    echo $this->formControlGroup($form->get('prenom'));
                    echo $this->formControlGroup($form->get('dateNaissance'));
                    echo $this->formControlGroup($form->get('code'));
                    ?>
                    <div class="row">
                        <div class="col-md-12">
                            <?= $this->formControlGroup($form->get('nomUsuel')); ?>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <?= $this->formControlGroup($form->get('prenom')); ?>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <?= $this->formControlGroup($form->get('dateNaissance')); ?>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <?= $this->formControlGroup($form->get('code')); ?>
                        </div>
                        <div class="col-md-6">
                            <?= $this->formControlGroup($form->get('codeRh')); ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
@@ -59,6 +76,10 @@ if ($errors) {
                        <div class="col-md-4"><?= $this->formControlGroup($form->get('civilite')); ?></div>
                        <div class="col-md-8"><?= $this->formControlGroup($form->get('nomPatronymique')); ?></div>
                    </div>
                    <div class="row">
                        <div class="col-md-6"><?= $this->formControlGroup($form->get('validiteDebut')); ?></div>
                        <div class="col-md-6"><?= $this->formControlGroup($form->get('validiteFin')); ?></div>
                    </div>
                    <?php
                    echo $this->formControlGroup($form->get('montantIndemniteFc'));
                    ?>