mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
fix missing choices in getFormDefaultData with automatic generation
This commit is contained in:
@@ -118,6 +118,14 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface, Grou
|
||||
}
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
$choices = array_combine(ListPersonHelper::FIELDS, ListPersonHelper::FIELDS);
|
||||
|
||||
foreach ($this->getCustomFields() as $cf) {
|
||||
$choices[$this->translatableStringHelper->localize($cf->getName())]
|
||||
=
|
||||
$cf->getSlug();
|
||||
}
|
||||
|
||||
return ['fields' => array_values($choices), 'address_date' => new DateTimeImmutable()];
|
||||
}
|
||||
|
||||
|
@@ -91,6 +91,8 @@ class ListPersonWithAccompanyingPeriod implements ExportElementValidatedInterfac
|
||||
}
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
$choices = array_combine(ListPersonHelper::FIELDS, ListPersonHelper::FIELDS);
|
||||
|
||||
return ['fields' => array_values($choices), 'address_date' => new DateTimeImmutable()];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user