Skip to content

Commit

Permalink
build config for all cases
Browse files Browse the repository at this point in the history
  • Loading branch information
mjauvin committed Apr 2, 2024
1 parent fce0cce commit f7996c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion formwidgets/MLNestedForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public function init()

// make the translationMode available to the nestedform formwidgets
if (isset($this->config->form)) {
$this->config->form['translationMode'] = $this->translationMode;
$this->config->form = $this->makeConfig($this->config->form);
$this->config->form->translationMode = $this->translationMode;
}

parent::init();
Expand Down
3 changes: 2 additions & 1 deletion formwidgets/MLRepeater.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public function init()
$this->fillFromConfig(['translationMode']);
// make the translationMode available to the repeater items formwidgets
if (isset($this->config->form)) {
$this->config->form['translationMode'] = $this->translationMode;
$this->config->form = $this->makeConfig($this->config->form);
$this->config->form->translationMode = $this->translationMode;
}

parent::init();
Expand Down

0 comments on commit f7996c4

Please sign in to comment.