Change symfony form back to original

This commit is contained in:
Julie Lenaerts 2025-02-17 13:11:03 +01:00
parent d0cd4792d6
commit 7d78512823

View File

@ -20,7 +20,9 @@ use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Entity\Location;
use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\MainBundle\Form\Type\CommentType;
use Chill\MainBundle\Form\Type\PickUserDynamicType;
use Chill\MainBundle\Form\Type\PrivateCommentType;
use Chill\MainBundle\Form\Type\ScopePickerType;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Chill\MainBundle\Templating\TranslatableStringHelper;
@ -206,14 +208,17 @@ class ActivityType extends AbstractType
}
if ($activityType->isVisible('comment')) {
$builder->add('comment', HiddenType::class, [
'data' => '',
$builder->add('comment', CommentType::class, [
'label' => empty($activityType->getLabel('comment'))
? 'activity.comment' : $activityType->getLabel('comment'),
'required' => $activityType->isRequired('comment'),
]);
}
if ($activityType->isVisible('privateComment')) {
$builder->add('privateComment', HiddenType::class, [
'data' => '',
$builder->add('privateComment', PrivateCommentType::class, [
'label' => '' === $activityType->getLabel('privateComment') ? 'private comment' : $activityType->getPrivateCommentLabel(),
'required' => false,
]);
}