Commit 85259520 authored by Florian Joriot's avatar Florian Joriot
Browse files

Correction selection structure dans reconduction OF

parent 3bcbb2b7
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -17,7 +17,14 @@ $this->headScript()->offsetSetFile(130, $this->basePath('/js/reconduction-centre
                                     'style' => 'width:250px;']);
                echo $this->formSelect($selectStructure);
                ?>

                <script>
                    $("body").on("change", "select.structure", function (event) {
                        $("*").css('cursor', 'wait');
                        var id = $(this).val();
                        var url = '<?= $this->url('of', [], ['query' => ['structure' => '__structure__']]) ?>';
                        $(location).attr('href', url.replace('__structure__', id));
                    });
                </script>
            </div>
        </div>
    </div>
+8 −0
Original line number Diff line number Diff line
@@ -17,6 +17,14 @@ $this->headScript()->offsetSetFile(100, $this->basePath('/js/reconduction-modula
                                     'style' => 'width:250px;']);
                echo $this->formSelect($selectStructure);
                ?>
                <script>
                    $("body").on("change", "select.structure", function (event) {
                        $("*").css('cursor', 'wait');
                        var id = $(this).val();
                        var url = '<?= $this->url('of', [], ['query' => ['structure' => '__structure__']]) ?>';
                        $(location).attr('href', url.replace('__structure__', id));
                    });
                </script>

            </div>
        </div>
+9 −1
Original line number Diff line number Diff line
@@ -18,11 +18,19 @@ $this->headScript()->offsetSetFile(100, $this->basePath('/js/reconduction-offre.
                $selectStructure = new \Laminas\Form\Element\Select('structure');
                $selectStructure
                    ->setValueOptions(['' => "(Sélectionnez une composante)"] + \UnicaenApp\Util::collectionAsOptions($structures))
                    ->setValue($structure?->getId())
                    ->setValue($structure ? $structure->getId() : null)
                    ->setAttributes(['class' => 'structure form-select',
                                     'style' => 'width:250px;']);
                echo $this->formSelect($selectStructure);
                ?>
                <script>
                    $("body").on("change", "select.structure", function (event) {
                        $("*").css('cursor', 'wait');
                        var id = $(this).val();
                        var url = '<?= $this->url('of', [], ['query' => ['structure' => '__structure__']]) ?>';
                        $(location).attr('href', url.replace('__structure__', id));
                    });
                </script>

            </div>
        </div>