From 972d0ab2c8f144843a4d8ded52491b4014f4b4b9 Mon Sep 17 00:00:00 2001 From: Jan Kristinus Date: Thu, 22 Feb 2024 17:48:55 +0100 Subject: [PATCH] CS --- plugins/manager/lib/yform/value/be_table.php | 4 ++-- .../manager/ytemplates/bootstrap/value.be_table-view.tpl.php | 2 +- plugins/manager/ytemplates/bootstrap/value.be_table.tpl.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/manager/lib/yform/value/be_table.php b/plugins/manager/lib/yform/value/be_table.php index e87e2aa1..3e3306a1 100644 --- a/plugins/manager/lib/yform/value/be_table.php +++ b/plugins/manager/lib/yform/value/be_table.php @@ -94,7 +94,7 @@ public static function getColumnsByName($definition) public function enterObject() { - if(is_array($this->getValue())){ + if (is_array($this->getValue())) { $this->setValue(json_encode(array_values($this->getValue()))); } if (!$this->getValue()) { @@ -135,7 +135,7 @@ public function enterObject() if ('value' == $col['field']) { $field->loadParams($yfparams, $col['values']); - $field->setName($this->getFieldName().']['.$this->getId().']'); + $field->setName($this->getFieldName() . '][' . $this->getId() . ']'); $field->init(); $field->setLabel(''); diff --git a/plugins/manager/ytemplates/bootstrap/value.be_table-view.tpl.php b/plugins/manager/ytemplates/bootstrap/value.be_table-view.tpl.php index 2d258480..43b8c6dc 100644 --- a/plugins/manager/ytemplates/bootstrap/value.be_table-view.tpl.php +++ b/plugins/manager/ytemplates/bootstrap/value.be_table-view.tpl.php @@ -48,7 +48,7 @@ /** @var rex_yform_value_abstract $field */ $field = $column['field']; $field->params['form_output'] = []; - $field->params['this']->setObjectparams('form_name',$this->getParam('form_name').']['.$this->getId() . '][' . $i); + $field->params['this']->setObjectparams('form_name', $this->getParam('form_name') . '][' . $this->getId() . '][' . $i); $field->params['this']->setObjectparams('form_ytemplate', $ytemplates); $field->params['this']->setObjectparams('main_id', $main_id); $field->params['this']->canEdit(false); diff --git a/plugins/manager/ytemplates/bootstrap/value.be_table.tpl.php b/plugins/manager/ytemplates/bootstrap/value.be_table.tpl.php index 5c61ddac..8b488f7e 100644 --- a/plugins/manager/ytemplates/bootstrap/value.be_table.tpl.php +++ b/plugins/manager/ytemplates/bootstrap/value.be_table.tpl.php @@ -49,7 +49,7 @@ /** @var rex_yform_value_abstract $field */ $field = $column['field']; $field->params['form_output'] = []; - $field->params['this']->setObjectparams('form_name',$this->getParam('form_name').']['.$this->getId() . '][' . $data_index); + $field->params['this']->setObjectparams('form_name', $this->getParam('form_name') . '][' . $this->getId() . '][' . $data_index); $field->params['this']->setObjectparams('form_ytemplate', $ytemplates); $field->params['this']->setObjectparams('main_id', $main_id); $field->params['form_name'] = $field->getName(); @@ -113,7 +113,7 @@ foreach ($columns as $i => $column) { $field = $columns[$i]['field']; $field->params['form_output'] = []; - $field->params['this']->setObjectparams('form_name',$this->getParam('form_name').']['.$this->getId() . '][{{FIELD_ID}}'); + $field->params['this']->setObjectparams('form_name', $this->getParam('form_name') . '][' . $this->getId() . '][{{FIELD_ID}}'); $field->params['this']->setObjectparams('form_ytemplate', $ytemplates); $field->params['this']->setObjectparams('main_id', $main_id); $field->params['form_name'] = $field->getName();