Loading module/Application/src/Hydrator/GenericHydrator.php +1 −1 Changes for module/Application/src/Hydrator/GenericHydrator.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -196,7 +196,7 @@ class GenericHydrator implements HydratorInterface public function setReadOnly(string $element, bool $readOnly = true) { $this->spec[$element]['readOnly'] = $readOnly; $this->spec[$element]['readonly'] = $readOnly; } Loading module/Intervenant/src/Controller/IntervenantController.php +4 −0 Changes for module/Intervenant/src/Controller/IntervenantController.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -373,6 +373,10 @@ class IntervenantController extends AbstractController } } if ($request->isXmlHttpRequest()) { return $this->redirect()->toRoute('intervenant/saisir', ['intervenant' => $intervenant->getId()]); } return $this->redirect()->toRoute('intervenant/voir', ['intervenant' => $intervenant->getId()], ['query' => ['tab' => 'edition']]); } catch (\Exception $e) { $errors[] = $this->translate($e); Loading module/Intervenant/src/Form/EditionForm.php +18 −5 Changes for module/Intervenant/src/Form/EditionForm.php: 18 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ class EditionForm extends AbstractForm $hydrator->spec(Intervenant::class); $this->setHydrator($hydrator); $this->setAttribute('action', $this->getCurrentUrl()); $this->setAttribute('class', 'form-intervenant-edition no-intranavigation'); $this->setAttribute('class', 'form-intervenant-edition'); $this->add([ Loading Loading @@ -495,14 +495,14 @@ class EditionForm extends AbstractForm public function activerEditionAvancee() { $elements = ['source', 'code', 'numeroPec', 'numeroInsee']; foreach ($this->getElements() as $element) { if (in_array($element->getName(), $elements)) { foreach ($elements as $elementName) { /** @var Element $element */ $element = $this->get($elementName); $element->removeAttribute('readonly'); $element->removeAttribute('disabled'); $element->removeAttribute('title'); } $this->getHydrator()->setReadOnly($elementName, false); } } Loading @@ -510,6 +510,19 @@ class EditionForm extends AbstractForm public function protection($object) { // Le formulaire pouvant être réutilisé, on retire d'abord les protections // appliquées lors d'un précédent bind avant de traiter l'objet courant. foreach ($this->getElements() as $element) { /** @var Element $element */ $element->removeAttribute('readonly'); $element->removeAttribute('disabled'); $element->removeAttribute('title'); if (array_key_exists($element->getName(), $this->hydratorElements)) { $this->getHydrator()->setReadOnly($element->getName(), false); } } if ($this->isReadOnly()) { foreach ($this->getElements() as $element) { Loading Loading
module/Application/src/Hydrator/GenericHydrator.php +1 −1 Changes for module/Application/src/Hydrator/GenericHydrator.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -196,7 +196,7 @@ class GenericHydrator implements HydratorInterface public function setReadOnly(string $element, bool $readOnly = true) { $this->spec[$element]['readOnly'] = $readOnly; $this->spec[$element]['readonly'] = $readOnly; } Loading
module/Intervenant/src/Controller/IntervenantController.php +4 −0 Changes for module/Intervenant/src/Controller/IntervenantController.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -373,6 +373,10 @@ class IntervenantController extends AbstractController } } if ($request->isXmlHttpRequest()) { return $this->redirect()->toRoute('intervenant/saisir', ['intervenant' => $intervenant->getId()]); } return $this->redirect()->toRoute('intervenant/voir', ['intervenant' => $intervenant->getId()], ['query' => ['tab' => 'edition']]); } catch (\Exception $e) { $errors[] = $this->translate($e); Loading
module/Intervenant/src/Form/EditionForm.php +18 −5 Changes for module/Intervenant/src/Form/EditionForm.php: 18 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ class EditionForm extends AbstractForm $hydrator->spec(Intervenant::class); $this->setHydrator($hydrator); $this->setAttribute('action', $this->getCurrentUrl()); $this->setAttribute('class', 'form-intervenant-edition no-intranavigation'); $this->setAttribute('class', 'form-intervenant-edition'); $this->add([ Loading Loading @@ -495,14 +495,14 @@ class EditionForm extends AbstractForm public function activerEditionAvancee() { $elements = ['source', 'code', 'numeroPec', 'numeroInsee']; foreach ($this->getElements() as $element) { if (in_array($element->getName(), $elements)) { foreach ($elements as $elementName) { /** @var Element $element */ $element = $this->get($elementName); $element->removeAttribute('readonly'); $element->removeAttribute('disabled'); $element->removeAttribute('title'); } $this->getHydrator()->setReadOnly($elementName, false); } } Loading @@ -510,6 +510,19 @@ class EditionForm extends AbstractForm public function protection($object) { // Le formulaire pouvant être réutilisé, on retire d'abord les protections // appliquées lors d'un précédent bind avant de traiter l'objet courant. foreach ($this->getElements() as $element) { /** @var Element $element */ $element->removeAttribute('readonly'); $element->removeAttribute('disabled'); $element->removeAttribute('title'); if (array_key_exists($element->getName(), $this->hydratorElements)) { $this->getHydrator()->setReadOnly($element->getName(), false); } } if ($this->isReadOnly()) { foreach ($this->getElements() as $element) { Loading