Commit 63b0da7e authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

utilisation de l'élément Structure

pas d'affichage hiérarchique : le selectpicker ne s'affiche pas correctement ici
parent ea28ceee
Loading
Loading
Loading
Loading
+2 −3
Changes for module/Application/src/View/Helper/UserProfileSelectRadioItem.php: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

namespace Application\View\Helper;

use Lieu\Form\Element\Structure;
use Lieu\Service\StructureServiceAwareTrait as StructureServiceAwareTrait;
use Lieu\Entity\Db\StructureAwareTrait;
use UnicaenApp\Traits\SessionContainerTrait;
@@ -34,10 +35,8 @@ class UserProfileSelectRadioItem extends UnicaenAuthViewHelper
        if ($this->role->getPeutChangerStructure() && $perimetre && $perimetre->isEtablissement()) {
            $selectClass = 'user-profile-select-input-structure';

            $select = new \Laminas\Form\Element\Select('structure-' . $this->role->getRoleId());
            $select = new Structure('structure-' . $this->role->getRoleId());
            $select
                ->setEmptyOption("(Aucune)")
                ->setValueOptions($this->getStructures())
                ->setValue($this->getStructure() ? $this->getStructure()->getId() : null)
                ->setAttribute('class', $selectClass)
                ->setAttribute('onchange', 'Util.userProfileStructureChange(this)')