mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Change symfony form back to original
This commit is contained in:
parent
d0cd4792d6
commit
7d78512823
@ -20,7 +20,9 @@ use Chill\MainBundle\Entity\Center;
|
|||||||
use Chill\MainBundle\Entity\Location;
|
use Chill\MainBundle\Entity\Location;
|
||||||
use Chill\MainBundle\Entity\User;
|
use Chill\MainBundle\Entity\User;
|
||||||
use Chill\MainBundle\Form\Type\ChillDateType;
|
use Chill\MainBundle\Form\Type\ChillDateType;
|
||||||
|
use Chill\MainBundle\Form\Type\CommentType;
|
||||||
use Chill\MainBundle\Form\Type\PickUserDynamicType;
|
use Chill\MainBundle\Form\Type\PickUserDynamicType;
|
||||||
|
use Chill\MainBundle\Form\Type\PrivateCommentType;
|
||||||
use Chill\MainBundle\Form\Type\ScopePickerType;
|
use Chill\MainBundle\Form\Type\ScopePickerType;
|
||||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||||
@ -206,14 +208,17 @@ class ActivityType extends AbstractType
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($activityType->isVisible('comment')) {
|
if ($activityType->isVisible('comment')) {
|
||||||
$builder->add('comment', HiddenType::class, [
|
$builder->add('comment', CommentType::class, [
|
||||||
'data' => '',
|
'label' => empty($activityType->getLabel('comment'))
|
||||||
|
? 'activity.comment' : $activityType->getLabel('comment'),
|
||||||
|
'required' => $activityType->isRequired('comment'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($activityType->isVisible('privateComment')) {
|
if ($activityType->isVisible('privateComment')) {
|
||||||
$builder->add('privateComment', HiddenType::class, [
|
$builder->add('privateComment', PrivateCommentType::class, [
|
||||||
'data' => '',
|
'label' => '' === $activityType->getLabel('privateComment') ? 'private comment' : $activityType->getPrivateCommentLabel(),
|
||||||
|
'required' => false,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user