Loading data/privileges.php +1 −0 Changes for data/privileges.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ return [ 'ajout-statut' => 'Ajout d\'un nouveau statut', 'visualisation-historises' => 'Voir les intervenants historisés', 'edition' => 'Edition', 'edition-avancee' => 'Edition avancée', 'suppression' => 'Suppression', 'exporter' => 'Exporter vers SIRH', 'statut-edition' => 'Statuts (Édition)', Loading module/Application/config/intervenant.config.php +1 −0 Changes for module/Application/config/intervenant.config.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -574,6 +574,7 @@ return [ Privileges::CLOTURE_CLOTURE, Privileges::CLOTURE_REOUVERTURE, Privileges::INTERVENANT_EDITION, Privileges::INTERVENANT_EDITION_AVANCEE, ], 'resources' => ['Validation', 'Intervenant'], 'assertion' => Assertion\IntervenantAssertion::class, Loading module/Application/src/Assertion/IntervenantAssertion.php +1 −0 Changes for module/Application/src/Assertion/IntervenantAssertion.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ class IntervenantAssertion extends AbstractAssertion case Privileges::CLOTURE_REOUVERTURE: return $this->assertCloture($entity); case Privileges::INTERVENANT_EDITION: case Privileges::INTERVENANT_EDITION_AVANCEE: return $this->assertEdition($entity); } break; Loading module/Application/src/Controller/IntervenantController.php +5 −0 Changes for module/Application/src/Controller/IntervenantController.php: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -323,6 +323,11 @@ class IntervenantController extends AbstractController $canEdit = $this->isAllowed($intervenant, Privileges::INTERVENANT_EDITION); $form->setReadOnly(!$canEdit); $form->bind($intervenant); //Edition avancée pour éditer le code et la source de l'intervenant $canEditAvancee = $this->isAllowed($intervenant, Privileges::INTERVENANT_EDITION_AVANCEE); if ($canEditAvancee) { $form->activerEditionAvancee(); } $ancienStatut = $intervenant->getStatut(); Loading module/Application/src/Form/Intervenant/EditionForm.php +17 −0 Changes for module/Application/src/Form/Intervenant/EditionForm.php: 17 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -461,9 +461,26 @@ class EditionForm extends AbstractForm public function activerEditionAvancee() { $elements = ['source', 'code']; foreach ($this->getElements() as $element) { if (in_array($element->getName(), $elements)) { /** @var Element $element */ $element->removeAttribute('readonly'); $element->removeAttribute('disabled'); $element->removeAttribute('title'); } } } public function protection($object) { if ($this->isReadOnly()) { foreach ($this->getElements() as $element) { /** @var Element $element */ $element->setAttribute('readonly', true); Loading Loading
data/privileges.php +1 −0 Changes for data/privileges.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ return [ 'ajout-statut' => 'Ajout d\'un nouveau statut', 'visualisation-historises' => 'Voir les intervenants historisés', 'edition' => 'Edition', 'edition-avancee' => 'Edition avancée', 'suppression' => 'Suppression', 'exporter' => 'Exporter vers SIRH', 'statut-edition' => 'Statuts (Édition)', Loading
module/Application/config/intervenant.config.php +1 −0 Changes for module/Application/config/intervenant.config.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -574,6 +574,7 @@ return [ Privileges::CLOTURE_CLOTURE, Privileges::CLOTURE_REOUVERTURE, Privileges::INTERVENANT_EDITION, Privileges::INTERVENANT_EDITION_AVANCEE, ], 'resources' => ['Validation', 'Intervenant'], 'assertion' => Assertion\IntervenantAssertion::class, Loading
module/Application/src/Assertion/IntervenantAssertion.php +1 −0 Changes for module/Application/src/Assertion/IntervenantAssertion.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ class IntervenantAssertion extends AbstractAssertion case Privileges::CLOTURE_REOUVERTURE: return $this->assertCloture($entity); case Privileges::INTERVENANT_EDITION: case Privileges::INTERVENANT_EDITION_AVANCEE: return $this->assertEdition($entity); } break; Loading
module/Application/src/Controller/IntervenantController.php +5 −0 Changes for module/Application/src/Controller/IntervenantController.php: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -323,6 +323,11 @@ class IntervenantController extends AbstractController $canEdit = $this->isAllowed($intervenant, Privileges::INTERVENANT_EDITION); $form->setReadOnly(!$canEdit); $form->bind($intervenant); //Edition avancée pour éditer le code et la source de l'intervenant $canEditAvancee = $this->isAllowed($intervenant, Privileges::INTERVENANT_EDITION_AVANCEE); if ($canEditAvancee) { $form->activerEditionAvancee(); } $ancienStatut = $intervenant->getStatut(); Loading
module/Application/src/Form/Intervenant/EditionForm.php +17 −0 Changes for module/Application/src/Form/Intervenant/EditionForm.php: 17 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -461,9 +461,26 @@ class EditionForm extends AbstractForm public function activerEditionAvancee() { $elements = ['source', 'code']; foreach ($this->getElements() as $element) { if (in_array($element->getName(), $elements)) { /** @var Element $element */ $element->removeAttribute('readonly'); $element->removeAttribute('disabled'); $element->removeAttribute('title'); } } } public function protection($object) { if ($this->isReadOnly()) { foreach ($this->getElements() as $element) { /** @var Element $element */ $element->setAttribute('readonly', true); Loading