Loading module/Application/src/Application/Controller/FicheMetier/FicheMetierTypeController.php +6 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ use Application\Form\FicheMetierType\MissionsPrincipalesForm; use Application\Form\FicheMetierType\MissionsPrincipalesFormAwareTrait; use Application\Service\Activite\ActiviteServiceAwareTrait; use Application\Service\FicheMetier\FicheMetierServiceAwareTrait; use Application\Service\RessourceRh\RessourceRhServiceAwareTrait; use Zend\Form\Element\Select; use Zend\Http\Request; use Zend\Mvc\Controller\AbstractActionController; Loading @@ -30,6 +31,7 @@ class FicheMetierTypeController extends AbstractActionController{ /** Traits associé aux services */ use ActiviteServiceAwareTrait; use FicheMetierServiceAwareTrait; use RessourceRhServiceAwareTrait; /** Traits associé aux formulaires */ use ActiviteFormAwareTrait; use ActiviteExistanteFormAwareTrait; Loading Loading @@ -103,6 +105,7 @@ class FicheMetierTypeController extends AbstractActionController{ $form = $this->getLibelleForm(); $form->setAttribute('action', $this->url()->fromRoute('fiche-metier-type/ajouter', [], [] , true)); $form->bind($fiche); // $familles = $this->getRessourceRhService()->getMetiersFamilles('libelle'); /** @var Request $request */ $request = $this->getRequest(); Loading @@ -117,7 +120,9 @@ class FicheMetierTypeController extends AbstractActionController{ $vm = new ViewModel(); $vm->setTemplate('application/default/default-form'); $vm->setVariables([ 'title' => 'Ajout d\'une fiche metier type', 'title' => 'Ajout d\'une fiche metier', // 'familles' => $familles, // 'metier' => $this->getRessourceRhService()->getMetier(11), 'form' => $form, ]); return $vm; Loading module/Application/src/Application/Controller/FicheMetier/FicheMetierTypeControllerFactory.php +4 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ use Application\Form\FicheMetierType\LibelleForm; use Application\Form\FicheMetierType\MissionsPrincipalesForm; use Application\Service\Activite\ActiviteService; use Application\Service\FicheMetier\FicheMetierService; use Application\Service\RessourceRh\RessourceRhService; use Zend\Mvc\Controller\ControllerManager; class FicheMetierTypeControllerFactory { Loading @@ -21,9 +22,11 @@ class FicheMetierTypeControllerFactory { /** * @var ActiviteService $activiteService * @var FicheMetierService $ficheMetierService * @var RessourceRhService $ressourceRhService */ $activiteService = $manager->getServiceLocator()->get(ActiviteService::class); $ficheMetierService = $manager->getServiceLocator()->get(FicheMetierService::class); $ressourceRhService = $manager->getServiceLocator()->get(RessourceRhService::class); /** * @var ActiviteForm $activiteForm Loading @@ -50,6 +53,7 @@ class FicheMetierTypeControllerFactory { $controller->setActiviteService($activiteService); $controller->setFicheMetierService($ficheMetierService); $controller->setRessourceRhService($ressourceRhService); $controller->setActiviteForm($activiteForm); $controller->setActiviteExistanteForm($activiteExistanteForm); Loading module/Application/src/Application/Form/Agent/AgentForm.php +10 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,8 @@ class AgentForm extends Form { ], 'attributes' => [ 'id' => 'quotite', 'class' => 'bootstrap-selectpicker show-tick', 'data-live-search' => 'true', ], ]); // Status Loading @@ -126,6 +128,8 @@ class AgentForm extends Form { ], 'attributes' => [ 'id' => 'status', 'class' => 'bootstrap-selectpicker show-tick', 'data-live-search' => 'true', ], ]); // Status Loading @@ -149,6 +153,8 @@ class AgentForm extends Form { ], 'attributes' => [ 'id' => 'correspondance', 'class' => 'bootstrap-selectpicker show-tick', 'data-live-search' => 'true', ], ]); // Corps Loading @@ -172,6 +178,8 @@ class AgentForm extends Form { ], 'attributes' => [ 'id' => 'corps', //'class' => 'bootstrap-selectpicker show-tick', //'data-live-search' => 'true', ], ]); // Grade Loading @@ -195,6 +203,8 @@ class AgentForm extends Form { ], 'attributes' => [ 'id' => 'grade', //'class' => 'bootstrap-selectpicker show-tick', //'data-live-search' => 'true', ], ]); Loading module/Application/src/Application/Form/FicheMetierType/LibelleForm.php +7 −16 Original line number Diff line number Diff line Loading @@ -2,38 +2,29 @@ namespace Application\Form\FicheMetierType; use Application\Entity\Db\Metier; use DoctrineModule\Form\Element\ObjectSelect; use UnicaenApp\Service\EntityManagerAwareTrait; use Application\Service\RessourceRh\RessourceRhServiceAwareTrait; use Zend\Form\Element\Button; use Zend\Form\Element\Select; use Zend\Form\Form; class LibelleForm extends Form { use EntityManagerAwareTrait; use RessourceRhServiceAwareTrait; public function init() { // libelle $this->add([ 'type' => ObjectSelect::class, 'type' => Select::class, 'name' => 'metier', 'options' => [ 'label' => "Libellé du métier :", 'empty_option' => "Sélectionner un metier ...", 'object_manager' => $this->getEntityManager(), 'target_class' => Metier::class, 'property' => 'libelle', 'find_method' => [ 'name' => 'findBy', 'params' => [ 'criteria' => [], 'orderBy' => ['libelle' => 'ASC'], ], ], 'disable_inarray_validator' => true, 'value_options' => $this->getRessourceRhService()->getMetiersTypesAsOptions(), ], 'attributes' => [ 'id' => 'metier', 'class' => 'bootstrap-selectpicker show-tick', 'data-live-search' => 'true', ], ]); // button Loading module/Application/src/Application/Form/FicheMetierType/LibelleFormFactory.php +6 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Application\Form\FicheMetierType; use Application\Service\RessourceRh\RessourceRhService; use Zend\Form\FormElementManager; class LibelleFormFactory { Loading @@ -11,7 +12,11 @@ class LibelleFormFactory{ /** @var LibelleHydrator $hydrator */ $hydrator = $manager->getServiceLocator()->get('HydratorManager')->get(LibelleHydrator::class); /** @var RessourceRhService $ressourceRhService */ $ressourceRhService = $manager->getServiceLocator()->get(RessourceRhService::class); $form = new LibelleForm(); $form->setRessourceRhService($ressourceRhService); $form->init(); $form->setHydrator($hydrator); Loading Loading
module/Application/src/Application/Controller/FicheMetier/FicheMetierTypeController.php +6 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ use Application\Form\FicheMetierType\MissionsPrincipalesForm; use Application\Form\FicheMetierType\MissionsPrincipalesFormAwareTrait; use Application\Service\Activite\ActiviteServiceAwareTrait; use Application\Service\FicheMetier\FicheMetierServiceAwareTrait; use Application\Service\RessourceRh\RessourceRhServiceAwareTrait; use Zend\Form\Element\Select; use Zend\Http\Request; use Zend\Mvc\Controller\AbstractActionController; Loading @@ -30,6 +31,7 @@ class FicheMetierTypeController extends AbstractActionController{ /** Traits associé aux services */ use ActiviteServiceAwareTrait; use FicheMetierServiceAwareTrait; use RessourceRhServiceAwareTrait; /** Traits associé aux formulaires */ use ActiviteFormAwareTrait; use ActiviteExistanteFormAwareTrait; Loading Loading @@ -103,6 +105,7 @@ class FicheMetierTypeController extends AbstractActionController{ $form = $this->getLibelleForm(); $form->setAttribute('action', $this->url()->fromRoute('fiche-metier-type/ajouter', [], [] , true)); $form->bind($fiche); // $familles = $this->getRessourceRhService()->getMetiersFamilles('libelle'); /** @var Request $request */ $request = $this->getRequest(); Loading @@ -117,7 +120,9 @@ class FicheMetierTypeController extends AbstractActionController{ $vm = new ViewModel(); $vm->setTemplate('application/default/default-form'); $vm->setVariables([ 'title' => 'Ajout d\'une fiche metier type', 'title' => 'Ajout d\'une fiche metier', // 'familles' => $familles, // 'metier' => $this->getRessourceRhService()->getMetier(11), 'form' => $form, ]); return $vm; Loading
module/Application/src/Application/Controller/FicheMetier/FicheMetierTypeControllerFactory.php +4 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ use Application\Form\FicheMetierType\LibelleForm; use Application\Form\FicheMetierType\MissionsPrincipalesForm; use Application\Service\Activite\ActiviteService; use Application\Service\FicheMetier\FicheMetierService; use Application\Service\RessourceRh\RessourceRhService; use Zend\Mvc\Controller\ControllerManager; class FicheMetierTypeControllerFactory { Loading @@ -21,9 +22,11 @@ class FicheMetierTypeControllerFactory { /** * @var ActiviteService $activiteService * @var FicheMetierService $ficheMetierService * @var RessourceRhService $ressourceRhService */ $activiteService = $manager->getServiceLocator()->get(ActiviteService::class); $ficheMetierService = $manager->getServiceLocator()->get(FicheMetierService::class); $ressourceRhService = $manager->getServiceLocator()->get(RessourceRhService::class); /** * @var ActiviteForm $activiteForm Loading @@ -50,6 +53,7 @@ class FicheMetierTypeControllerFactory { $controller->setActiviteService($activiteService); $controller->setFicheMetierService($ficheMetierService); $controller->setRessourceRhService($ressourceRhService); $controller->setActiviteForm($activiteForm); $controller->setActiviteExistanteForm($activiteExistanteForm); Loading
module/Application/src/Application/Form/Agent/AgentForm.php +10 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,8 @@ class AgentForm extends Form { ], 'attributes' => [ 'id' => 'quotite', 'class' => 'bootstrap-selectpicker show-tick', 'data-live-search' => 'true', ], ]); // Status Loading @@ -126,6 +128,8 @@ class AgentForm extends Form { ], 'attributes' => [ 'id' => 'status', 'class' => 'bootstrap-selectpicker show-tick', 'data-live-search' => 'true', ], ]); // Status Loading @@ -149,6 +153,8 @@ class AgentForm extends Form { ], 'attributes' => [ 'id' => 'correspondance', 'class' => 'bootstrap-selectpicker show-tick', 'data-live-search' => 'true', ], ]); // Corps Loading @@ -172,6 +178,8 @@ class AgentForm extends Form { ], 'attributes' => [ 'id' => 'corps', //'class' => 'bootstrap-selectpicker show-tick', //'data-live-search' => 'true', ], ]); // Grade Loading @@ -195,6 +203,8 @@ class AgentForm extends Form { ], 'attributes' => [ 'id' => 'grade', //'class' => 'bootstrap-selectpicker show-tick', //'data-live-search' => 'true', ], ]); Loading
module/Application/src/Application/Form/FicheMetierType/LibelleForm.php +7 −16 Original line number Diff line number Diff line Loading @@ -2,38 +2,29 @@ namespace Application\Form\FicheMetierType; use Application\Entity\Db\Metier; use DoctrineModule\Form\Element\ObjectSelect; use UnicaenApp\Service\EntityManagerAwareTrait; use Application\Service\RessourceRh\RessourceRhServiceAwareTrait; use Zend\Form\Element\Button; use Zend\Form\Element\Select; use Zend\Form\Form; class LibelleForm extends Form { use EntityManagerAwareTrait; use RessourceRhServiceAwareTrait; public function init() { // libelle $this->add([ 'type' => ObjectSelect::class, 'type' => Select::class, 'name' => 'metier', 'options' => [ 'label' => "Libellé du métier :", 'empty_option' => "Sélectionner un metier ...", 'object_manager' => $this->getEntityManager(), 'target_class' => Metier::class, 'property' => 'libelle', 'find_method' => [ 'name' => 'findBy', 'params' => [ 'criteria' => [], 'orderBy' => ['libelle' => 'ASC'], ], ], 'disable_inarray_validator' => true, 'value_options' => $this->getRessourceRhService()->getMetiersTypesAsOptions(), ], 'attributes' => [ 'id' => 'metier', 'class' => 'bootstrap-selectpicker show-tick', 'data-live-search' => 'true', ], ]); // button Loading
module/Application/src/Application/Form/FicheMetierType/LibelleFormFactory.php +6 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Application\Form\FicheMetierType; use Application\Service\RessourceRh\RessourceRhService; use Zend\Form\FormElementManager; class LibelleFormFactory { Loading @@ -11,7 +12,11 @@ class LibelleFormFactory{ /** @var LibelleHydrator $hydrator */ $hydrator = $manager->getServiceLocator()->get('HydratorManager')->get(LibelleHydrator::class); /** @var RessourceRhService $ressourceRhService */ $ressourceRhService = $manager->getServiceLocator()->get(RessourceRhService::class); $form = new LibelleForm(); $form->setRessourceRhService($ressourceRhService); $form->init(); $form->setHydrator($hydrator); Loading