Commit b2b891cf authored by Stéphane Bouvry's avatar Stéphane Bouvry
Browse files

FIX : Nouvelle organisation (bug d'hydratation des données)

parent fc6d134d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -331,13 +331,15 @@ class OrganizationController extends AbstractOscarController
    public function newAction()
    {
        $form = new OrganizationIdentificationForm($this->getOrganizationService()->getConnectorsList(), $this->getOrganizationService()->getOrganizationTypesSelect());
        $entity = new Organization();
        $form->init();
        $form->bind($entity);


        if ($this->getRequest()->isPost()) {
            $posted = $this->getRequest()->getPost();
            $form->setData($posted);
            if( $form->isValid() ){
                $entity = new Organization();
                $this->getEntityManager()->persist($entity);
                $this->getEntityManager()->flush($entity);
                $this->redirect()->toRoute('organization/show', ['id'=>$entity->getId()]);
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@

    <ul class="errors">
        <?php foreach ($form->getMessages() as $msg): ?>
            <li><?= $msg ?></li>
            <li><?= var_dump($msg) ?></li>
        <?php endforeach; ?>
    </ul>