Skip to content

Commit

Permalink
CS
Browse files Browse the repository at this point in the history
  • Loading branch information
dergel committed Feb 22, 2024
1 parent 9516a44 commit 972d0ab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions plugins/manager/lib/yform/value/be_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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('');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions plugins/manager/ytemplates/bootstrap/value.be_table.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 972d0ab

Please sign in to comment.