From 7dc70baf57980b4a02bab57ef4f55ee352a729ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 29 Jun 2021 17:39:19 +0200 Subject: [PATCH] =?UTF-8?q?permet=20de=20surcharger=20le=20label=20'commen?= =?UTF-8?q?taire'=20des=20actviit=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Bundle/ChillActivityBundle/Form/ActivityType.php | 3 ++- src/Bundle/ChillActivityBundle/translations/messages.fr.yml | 1 + src/Bundle/ChillMainBundle/Form/Type/CommentType.php | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityType.php b/src/Bundle/ChillActivityBundle/Form/ActivityType.php index 3ad204f18..8c8fb45a9 100644 --- a/src/Bundle/ChillActivityBundle/Form/ActivityType.php +++ b/src/Bundle/ChillActivityBundle/Form/ActivityType.php @@ -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'), ]); } diff --git a/src/Bundle/ChillActivityBundle/translations/messages.fr.yml b/src/Bundle/ChillActivityBundle/translations/messages.fr.yml index 3f3f8ff45..c486df909 100644 --- a/src/Bundle/ChillActivityBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillActivityBundle/translations/messages.fr.yml @@ -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 diff --git a/src/Bundle/ChillMainBundle/Form/Type/CommentType.php b/src/Bundle/ChillMainBundle/Form/Type/CommentType.php index 2e9a19717..afcd061e6 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/CommentType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/CommentType.php @@ -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'], ]) ;