permet de surcharger le label 'commentaire' des actviités

This commit is contained in:
Julien Fastré 2021-06-29 17:39:19 +02:00
parent 5bae8dc5bf
commit 7dc70baf57
3 changed files with 5 additions and 2 deletions

View File

@ -224,7 +224,8 @@ class ActivityType extends AbstractType
if ($activityType->isVisible('comment')) {
$builder->add('comment', CommentType::class, [
'label' => $activityType->getLabel('comment'),
'label' => empty($activityType->getLabel('comment'))
? 'activity.comment' : $activityType->getLabel('comment'),
'required' => $activityType->isRequired('comment'),
]);
}

View File

@ -74,6 +74,7 @@ Users concerned: T(M)S
activity:
Insert a document: Insérer un document
Remove a document: Supprimer le document
comment: Commentaire
#timeline

View File

@ -45,7 +45,8 @@ class CommentType extends AbstractType
{
$builder
->add('comment', ChillTextareaType::class, [
'disable_editor' => $options['disable_editor']
'disable_editor' => $options['disable_editor'],
'label' => $options['label'],
])
;