Skip to content

Commit e1188fa

Browse files
committed
WIP
1 parent b8ad1c1 commit e1188fa

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

library/Director/Web/Form/DirectorObjectForm.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ protected function setCustomVarValues($values)
515515
$items = $this->fetchPropertyItems(Uuid::fromBytes($property['uuid']));
516516
$value = [];
517517
$i = 0;
518-
while ($this->hasElement($varName . "_property_label_$i")) {
518+
while ($this->hasElement($varName . "_property_$i")) {
519519
$propertyLabel = $this->getValue($varName . "_property_label_$i");
520520

521521
if (! empty($propertyLabel)) {
@@ -1109,12 +1109,12 @@ protected function addProperties(): self
11091109

11101110
$nestedProperty = $this->createElement(
11111111
'customFieldset',
1112-
'var_' . $property['key_name'] . "_$key",
1112+
'var_' . $property['key_name'] . "_property_$i",
11131113
[
11141114
'decorators' => [
11151115
['FormElements'],
11161116
['HtmlTag', ['tag' => 'dl']],
1117-
'CustomFieldset',
1117+
'Fieldset',
11181118
],
11191119
'legend' => $key,
11201120
'label' => $key,
@@ -1158,19 +1158,22 @@ protected function addProperties(): self
11581158

11591159
$nestedProperty = $this->createElement(
11601160
'customFieldset',
1161-
'var_' . $property['key_name'] . "_property$i",
1161+
'var_' . $property['key_name'] . "_property_$i",
11621162
[
1163-
'decorators' => ['CustomFieldset', ['elements' => $nestedElements]],
1163+
'decorators' => ['Fieldset'],
11641164
'legend' => "New Property",
11651165
'label' => "New Property",
11661166
// 'elements' => $nestedElements,
11671167
]
11681168
);
11691169

11701170
$nestedProperty->addElements($nestedElements);
1171+
$this->addElement($nestedProperty);
11711172
// $this->addDisplayGroups([$nestedProperty]);
11721173
$propertyGroupElements[] = $nestedProperty;
11731174
} else {
1175+
$this->addElement($nestedProperty);
1176+
11741177
$this->addElement($addItem);
11751178
$propertyGroupElements[] = $addItem;
11761179
}

0 commit comments

Comments
 (0)