contributte/forms-bootstrap

Bad Group & Row rendering

yosieu opened this issue · 1 comments

Hello,

you have an error in BootstrapForm rendering. If is defined group witch contains BootstrapRow, then is rendered multiple duplicity rows with their contents and at the end is rendered Group.

Error is in class BootstrapRow, where you don't make $this-setOption(rendered, true);

Thanks for fix it.

Example:

   $row1 = $this->addRow("line1");
    $row1->addCell(6)
            ->addSelect('category', 'Kategorie', $this->category_repository->getIdNameList())
                ->setHtmlAttribute("class", "selectpicker form-control")
                ->setHtmlAttribute("title", "Vyberte ...")
                ->setRequired(true)
                ->getLabelPrototype()
                    ->setClass('required');

    $row1->addCell(6)
            ->addSelect('edition', 'Ročník', Edition::getList())
                ->setHtmlAttribute("class", "selectpicker form-control")
                ->setHtmlAttribute("title", "Vyberte ...")
                ->setRequired(true)
                ->getLabelPrototype()
                    ->setClass('required');

    $group1 = $this->addGroup('Group 1', false)
                    ->add([$row1]);

image

@yosieu thanks for reporting this is fixed in master, v0.5.2 released, fix is in it.