mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
apply ckeditor on multiple entities
Apply ckeditor into: * activity; * task; * document; * accompanying periods
This commit is contained in:
@@ -20,7 +20,7 @@ namespace Chill\MainBundle\Form\Type;
|
||||
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
use Chill\MainBundle\Form\Type\ChillTextareaType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Form\FormEvent;
|
||||
use Symfony\Component\Form\FormEvents;
|
||||
@@ -44,8 +44,8 @@ class CommentType extends AbstractType
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('comment', TextareaType::class, [
|
||||
|
||||
->add('comment', ChillTextareaType::class, [
|
||||
'disable_editor' => $options['disable_editor']
|
||||
])
|
||||
;
|
||||
|
||||
@@ -72,8 +72,12 @@ class CommentType extends AbstractType
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => CommentEmbeddable::class,
|
||||
]);
|
||||
$resolver
|
||||
->setDefined('disable_editor')
|
||||
->setAllowedTypes('disable_editor', 'bool')
|
||||
->setDefaults([
|
||||
'data_class' => CommentEmbeddable::class,
|
||||
'disable_editor' => false
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user