Commit 204da307 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Rendre le champs code_rh de la table voirie editable via l'administration

parent 0a23e99d
Loading
Loading
Loading
Loading
+1 −10
Changes for module/Application/src/Entity/Db/Voirie.php: 1 added line, 10 removed lines.
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ class Voirie implements HistoriqueAwareInterface, ImportAwareInterface
    protected $libelle;



    /**
     * @return int|null
     */
@@ -46,7 +45,6 @@ class Voirie implements HistoriqueAwareInterface, ImportAwareInterface
    }



    /**
     * @param int|null $id
     *
@@ -60,7 +58,6 @@ class Voirie implements HistoriqueAwareInterface, ImportAwareInterface
    }



    /**
     * @return string|null
     */
@@ -70,7 +67,6 @@ class Voirie implements HistoriqueAwareInterface, ImportAwareInterface
    }



    /**
     * @param string|null $code
     *
@@ -84,7 +80,6 @@ class Voirie implements HistoriqueAwareInterface, ImportAwareInterface
    }



    /**
     * @return string|null
     */
@@ -94,7 +89,6 @@ class Voirie implements HistoriqueAwareInterface, ImportAwareInterface
    }



    /**
     * @param string|null $codeRh
     *
@@ -102,13 +96,12 @@ class Voirie implements HistoriqueAwareInterface, ImportAwareInterface
     */
    public function setCodeRh(?string $codeRh): Voirie
    {
        $this->code = $codeRh;
        $this->codeRh = $codeRh;

        return $this;
    }



    /**
     * @return string|null
     */
@@ -118,7 +111,6 @@ class Voirie implements HistoriqueAwareInterface, ImportAwareInterface
    }



    /**
     * @param string|null $libelle
     *
@@ -132,7 +124,6 @@ class Voirie implements HistoriqueAwareInterface, ImportAwareInterface
    }



    /**
     * Retourne la représentation littérale de cet objet.
     *
+16 −2
Changes for module/Application/src/Form/Voirie/VoirieSaisieForm.php: 16 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -22,12 +22,12 @@ class VoirieSaisieForm extends AbstractForm
        'id'         => ['type' => 'int'],
        'libelle'    => ['type' => 'string'],
        'code'       => ['type' => 'string'],
        'codeRh'     => ['type' => 'string'],
        'source'     => ['type' => Source::class],
        'sourceCode' => ['type' => 'string'],
    ];



    public function init()
    {
        $hydrator = new GenericHydrator($this->getServiceSource()->getEntityManager(), $this->hydratorElements);
@@ -57,6 +57,18 @@ class VoirieSaisieForm extends AbstractForm
            'type'       => 'Text',
        ]);

        $this->add([
            'name'       => 'codeRh',
            'options'    => [
                'label' => "Code RH",
            ],
            'attributes' => [
                'id' => uniqid('codeRh'),
            ],
            'type'       => 'Text',
        ]);


        $this->add([
            'name'    => 'source',
            'type'    => 'Select',
@@ -94,7 +106,6 @@ class VoirieSaisieForm extends AbstractForm
    }



    /**
     * Should return an array specification compatible with
     * {@link Laminas\InputFilter\Factory::createInputFilter()}.
@@ -110,6 +121,9 @@ class VoirieSaisieForm extends AbstractForm
            'code'    => [
                'required' => false,
            ],
            'code_rh' => [
                'required' => false,
            ],
        ];
    }