Commit 949bd3a0 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Fix des oublies

parent 495c5d10
Loading
Loading
Loading
Loading
+2 −1
Changes for composer.json: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -10,7 +10,8 @@
    "require": {
        "unicaen/app":                  "^1.2",
        "unicaen/auth":                 "^1.2",
        "unicaen/ldap": "^2.2"
        "unicaen/ldap": "^2.2",
        "unicaen/octopus": "^0.1.0"
    },
    "require-dev": {
        "unicaen/code":                         "^1.0",
+31 −3
Changes for composer.lock: 31 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
        "This file is @generated automatically"
    ],
    "content-hash": "bfc07f403e04b3d5970f0443758676ac",
    "content-hash": "755305381140989078e604b92659e437",
    "packages": [
        {
            "name": "bjyoungblood/bjy-authorize",
@@ -762,12 +762,12 @@
            "version": "v2.5.14",
            "source": {
                "type": "git",
                "url": "https://github.com/doctrine/doctrine2.git",
                "url": "https://github.com/doctrine/orm.git",
                "reference": "810a7baf81462a5ddf10e8baa8cb94b6eec02754"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/810a7baf81462a5ddf10e8baa8cb94b6eec02754",
                "url": "https://api.github.com/repos/doctrine/orm/zipball/810a7baf81462a5ddf10e8baa8cb94b6eec02754",
                "reference": "810a7baf81462a5ddf10e8baa8cb94b6eec02754",
                "shasum": ""
            },
@@ -1519,6 +1519,34 @@
            "description": "Module Ldap des applications Unicaen",
            "time": "2018-02-26T08:32:18+00:00"
        },
        {
            "name": "unicaen/octopus",
            "version": "0.1",
            "source": {
                "type": "git",
                "url": "https://git.unicaen.fr/lib/unicaen/octopus.git",
                "reference": "9802714d7b5640ec1678c8d3d800a5a3986ae703"
            },
            "require": {
                "bjyoungblood/bjy-authorize": ">=1.4",
                "unicaen/app": "^1.3",
                "zf-commons/zfc-user-doctrine-orm": ">=0.1"
            },
            "require-dev": {
                "phpunit/phpunit": ">=3.7"
            },
            "type": "library",
            "autoload": {
                "psr-0": {
                    "UnicaenOctopus": "src/"
                },
                "classmap": [
                    "./Module.php"
                ]
            },
            "description": "Module de recupération des entités provenant octopus",
            "time": "2019-02-01T12:57:45+00:00"
        },
        {
            "name": "zendframework/zend-authentication",
            "version": "2.4.13",
+15
Changes for module/Application/config/merged/fiche-metier.config.php: 15 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -43,6 +43,8 @@ use Application\Form\FicheMetierType\LibelleForm;
use Application\Form\FicheMetierType\LibelleFormFactory;
use Application\Form\FicheMetierType\LibelleHydrator;
use Application\Form\FicheMetierType\LibelleHydratorFactory;
use Application\Form\FicheMetierType\MissionsPrincipalesForm;
use Application\Form\FicheMetierType\MissionsPrincipalesFormFactory;
use Application\Provider\Privilege\FicheMetierPrivileges;
use Application\Service\FicheMetier\FicheMetierService;
use Application\Service\FicheMetier\FicheMetierServiceFactory;
@@ -119,6 +121,7 @@ return [
                        'modifier-operationnelle',
                        'modifier-comportementale',
                        'modifier-application',
                        'ajouter',
                    ],
                    'privileges' => [
                        FicheMetierPrivileges::AFFICHER,
@@ -249,6 +252,17 @@ return [
                ],
                'may_terminate' => true,
                'child_routes' => [
                    'ajouter' => [
                        'type'  => Literal::class,
                        'options' => [
                            'route'    => '/ajouter',
                            'defaults' => [
                                'controller' => FicheMetierTypeController::class,
                                'action'     => 'ajouter',
                            ],
                        ],
                        'may_terminate' => true,
                    ],
                    'afficher' => [
                        'type'  => Segment::class,
                        'options' => [
@@ -395,6 +409,7 @@ return [
            ActiviteExistanteForm::class => ActiviteExistanteFormFactory::class,
            FicheMetierCreationForm::class => FicheMetierCreationFormFactory::class,
            LibelleForm::class => LibelleFormFactory::class,
            MissionsPrincipalesForm::class => MissionsPrincipalesFormFactory::class,

            SpecificitePosteForm::class => SpecificitePosteFormFactory::class,
            AssocierMetierTypeForm::class => AssocierMetierTypeFormFactory::class,
+31
Changes for module/Application/src/Application/Controller/FicheMetier/FicheMetierTypeController.php: 31 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
namespace Application\Controller\FicheMetier;

use Application\Entity\Db\Activite;
use Application\Entity\Db\FicheMetierType;
use Application\Form\Activite\ActiviteForm;
use Application\Form\FicheMetierType\ActiviteExistanteForm;
use Application\Form\FicheMetierType\ApplicationsForm;
@@ -41,6 +42,36 @@ class FicheMetierTypeController extends AbstractActionController{
        ]);
    }

    public function ajouterAction()
    {
        /** @var FicheMetierType $fiche */
        $fiche = new FicheMetierType();

        /** @var LibelleForm $form */
        $form = $this->getServiceLocator()->get('FormElementManager')->get(LibelleForm::class);
        $form->setAttribute('action', $this->url()->fromRoute('fiche-metier-type/ajouter', [], [] , true));
        $form->bind($fiche);

        /** @var Request $request */
        $request = $this->getRequest();
        if ($request->isPost()) {
            $data = $request->getPost();
            $form->setData($data);
            if ($form->isValid()) {
                $this->getFicheMetierService()->createFicheMetierType($fiche);
            }
        }

        $vm = new ViewModel();
        $vm->setTemplate('application/default/default-form');
        $vm->setVariables([
            'title' => 'Ajout d\'une fiche metier type',
            'form' => $form,
        ]);
        return $vm;

    }

    public function editerLibelleAction()
    {
        $fiche = $this->getFicheMetierService()->getRequestedFicheMetierType($this, 'id', true);
+1 −1
Changes for module/Application/src/Application/Form/FicheMetierType/LibelleForm.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ class LibelleForm extends Form {
            'type' => ObjectSelect::class,
            'name' => 'metier',
            'options' => [
                'label' => "Service/composante/direction d'affectation :",
                'label' => "Libellé du métier :",
                'empty_option' => "Sélectionner un metier ...",
                'object_manager' => $this->getEntityManager(),
                'target_class' => Metier::class,
Loading