activity: add user current location as default for a new activity

This commit is contained in:
nobohan
2021-11-17 15:21:53 +01:00
parent cd4de2e244
commit 63e5220084
3 changed files with 11 additions and 9 deletions

View File

@@ -29,7 +29,7 @@ class UserCurrentLocationType extends AbstractType
'class' => Location::class,
'choice_label' => function (Location $entity) {
return $entity->getName() ?
$entity->getName() :
$entity->getLocationType()->getTitle()['fr'] . ' ' . $entity->getName() :
//$this->translatableStringHelper->localize($entity->getLocationType()->getTitle()); //TODO does not work
$entity->getLocationType()->getTitle()['fr'];
},