Skip to content

Commit

Permalink
Fix htmlbootstrapFormWidget by adding `deprecatedDeclareFormBeforeCon…
Browse files Browse the repository at this point in the history
…trols` builder option

Since jelix 1.8.7, we need to add `deprecatedDeclareFormBeforeControls` builder option because in the `outputHeader` we defined `jFormsJQ.declareForm(jFormsJQ.tForm);` and we use `parent::outputFooter($builder);
  • Loading branch information
rldhont committed Feb 15, 2024
1 parent edaff3d commit 01406b1
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ public function outputHeader($builder)
*/
public function outputFooter($builder)
{
// Since jelix 1.8.7, we need to add `deprecatedDeclareFormBeforeControls` builder option
// because in the `outputHeader` we defined `jFormsJQ.declareForm(jFormsJQ.tForm);`
// and we use `parent::outputFooter($builder);`
$builder->setOptions(
array(
'errorDecorator' => $builder->getOption('errorDecorator'),
'modal' => $builder->getOption('modal'),
'deprecatedDeclareFormBeforeControls' => true,
)
);
if ($builder->getOption('modal')) {
echo '</div>';
}
Expand Down

0 comments on commit 01406b1

Please sign in to comment.