Loading module/OffreFormation/src/Form/ElementPedagogiqueRechercheFieldset.php +24 Changes for module/OffreFormation/src/Form/ElementPedagogiqueRechercheFieldset.php: 24 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset protected $queryBuilder; public function init() { $hydrator = new ElementPedagogiqueRechercheHydrator; Loading @@ -63,6 +64,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset 'title' => "Structure gestionnaire de l'enseignement", ], 'enseignement' => true, 'context_filter' => false, ], 'attributes' => [ 'id' => 'structure', Loading Loading @@ -152,6 +154,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset } public function populateOptions() { $data = $this->getData(); Loading @@ -161,6 +164,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset } protected function getData() { $sql = " Loading Loading @@ -191,17 +195,22 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset ); $result = [ 'structures' => [], 'niveaux' => [], 'etapes' => [], 'relations' => ['ALL' => ['ALL' => []]], ]; foreach ($res as $e) { $structureId = $e['STRUCTURE_ID']; $structure = $e['STRUCTURE_LIBELLE']; $niveauId = $e['NIVEAU_ID']; $niveau = $e['NIVEAU_LIBELLE']; $etapeId = $e['ETAPE_ID']; $etape = $e['ETAPE_LIBELLE']; if (!isset($result['structures'][$structureId])) { $result['structures'][$structureId] = $structure; } if (!isset($result['niveaux'][$niveauId])) { $result['niveaux'][$niveauId] = $niveau; } Loading @@ -223,54 +232,63 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset $result['relations']['ALL'][$niveauId][] = $etapeId; $result['relations'][$structureId][$niveauId][] = $etapeId; } asort($result['structures']); asort($result['etapes']); return $result; } public function getRelations() { return $this->relations; } public function getStructureName() { return $this->structureName; } public function getNiveauName() { return $this->niveauName; } public function getEtapeName() { return $this->etapeName; } public function getStructureEnabled() { return $this->structureEnabled; } public function getNiveauEnabled() { return $this->niveauEnabled; } public function getEtapeEnabled() { return $this->etapeEnabled; } public function setStructureEnabled($structureEnabled = true) { $this->structureEnabled = $structureEnabled; Loading @@ -279,6 +297,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset } public function setNiveauEnabled($niveauEnabled = true) { $this->niveauEnabled = $niveauEnabled; Loading @@ -287,6 +306,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset } public function setEtapeEnabled($etapeEnabled = true) { $this->etapeEnabled = $etapeEnabled; Loading @@ -295,6 +315,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset } /** * @return string */ Loading @@ -304,6 +325,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset } /** * @param string $elementId * Loading @@ -318,6 +340,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset } /** * Should return an array specification compatible with * {@link Laminas\InputFilter\Factory::createInputFilter()}. Loading Loading @@ -377,6 +400,7 @@ class ElementPedagogiqueRechercheHydrator implements HydratorInterface } /** * Extract values from an object * Loading public/js/offre-formation.js +3 −1 Changes for public/js/offre-formation.js: 3 added lines, 1 removed line. Original line number Diff line number Diff line /** * etapeCentreCout * elementPedagogiqueRecherche */ $.widget("ose.elementPedagogiqueRecherche", { Loading @@ -14,6 +14,7 @@ $.widget("ose.elementPedagogiqueRecherche", { for (nId in this.relations[structureId ? structureId : 'ALL']) { niveauxValues.push(nId); } var etapesValues = this.relations[structureId ? structureId : 'ALL'][niveauId ? niveauId : 'ALL']; if ($.inArray(etapeId, etapesValues) == -1) { etapeId = ""; Loading Loading @@ -110,6 +111,7 @@ $.widget("ose.elementPedagogiqueRecherche", { var that = this; this.relations = this.element.data('relations'); console.log(this.relations); this.getElementAutocompleteElement().autocomplete(); this.getElementElement().hide(); Loading Loading
module/OffreFormation/src/Form/ElementPedagogiqueRechercheFieldset.php +24 Changes for module/OffreFormation/src/Form/ElementPedagogiqueRechercheFieldset.php: 24 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset protected $queryBuilder; public function init() { $hydrator = new ElementPedagogiqueRechercheHydrator; Loading @@ -63,6 +64,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset 'title' => "Structure gestionnaire de l'enseignement", ], 'enseignement' => true, 'context_filter' => false, ], 'attributes' => [ 'id' => 'structure', Loading Loading @@ -152,6 +154,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset } public function populateOptions() { $data = $this->getData(); Loading @@ -161,6 +164,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset } protected function getData() { $sql = " Loading Loading @@ -191,17 +195,22 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset ); $result = [ 'structures' => [], 'niveaux' => [], 'etapes' => [], 'relations' => ['ALL' => ['ALL' => []]], ]; foreach ($res as $e) { $structureId = $e['STRUCTURE_ID']; $structure = $e['STRUCTURE_LIBELLE']; $niveauId = $e['NIVEAU_ID']; $niveau = $e['NIVEAU_LIBELLE']; $etapeId = $e['ETAPE_ID']; $etape = $e['ETAPE_LIBELLE']; if (!isset($result['structures'][$structureId])) { $result['structures'][$structureId] = $structure; } if (!isset($result['niveaux'][$niveauId])) { $result['niveaux'][$niveauId] = $niveau; } Loading @@ -223,54 +232,63 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset $result['relations']['ALL'][$niveauId][] = $etapeId; $result['relations'][$structureId][$niveauId][] = $etapeId; } asort($result['structures']); asort($result['etapes']); return $result; } public function getRelations() { return $this->relations; } public function getStructureName() { return $this->structureName; } public function getNiveauName() { return $this->niveauName; } public function getEtapeName() { return $this->etapeName; } public function getStructureEnabled() { return $this->structureEnabled; } public function getNiveauEnabled() { return $this->niveauEnabled; } public function getEtapeEnabled() { return $this->etapeEnabled; } public function setStructureEnabled($structureEnabled = true) { $this->structureEnabled = $structureEnabled; Loading @@ -279,6 +297,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset } public function setNiveauEnabled($niveauEnabled = true) { $this->niveauEnabled = $niveauEnabled; Loading @@ -287,6 +306,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset } public function setEtapeEnabled($etapeEnabled = true) { $this->etapeEnabled = $etapeEnabled; Loading @@ -295,6 +315,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset } /** * @return string */ Loading @@ -304,6 +325,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset } /** * @param string $elementId * Loading @@ -318,6 +340,7 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset } /** * Should return an array specification compatible with * {@link Laminas\InputFilter\Factory::createInputFilter()}. Loading Loading @@ -377,6 +400,7 @@ class ElementPedagogiqueRechercheHydrator implements HydratorInterface } /** * Extract values from an object * Loading
public/js/offre-formation.js +3 −1 Changes for public/js/offre-formation.js: 3 added lines, 1 removed line. Original line number Diff line number Diff line /** * etapeCentreCout * elementPedagogiqueRecherche */ $.widget("ose.elementPedagogiqueRecherche", { Loading @@ -14,6 +14,7 @@ $.widget("ose.elementPedagogiqueRecherche", { for (nId in this.relations[structureId ? structureId : 'ALL']) { niveauxValues.push(nId); } var etapesValues = this.relations[structureId ? structureId : 'ALL'][niveauId ? niveauId : 'ALL']; if ($.inArray(etapeId, etapesValues) == -1) { etapeId = ""; Loading Loading @@ -110,6 +111,7 @@ $.widget("ose.elementPedagogiqueRecherche", { var that = this; this.relations = this.element.data('relations'); console.log(this.relations); this.getElementAutocompleteElement().autocomplete(); this.getElementElement().hide(); Loading