@@ -31,6 +31,11 @@ class DreamType extends AbstractType | |||
*/ | |||
public function buildForm(FormBuilderInterface $builder, array $options) | |||
{ | |||
$placeholder = ""; | |||
if (isset($options['placeholder_description'])) { | |||
$placeholder = $options['placeholder_description']; | |||
} | |||
$builder->add( | |||
'description', | |||
TextareaType::class, | |||
@@ -39,6 +44,9 @@ class DreamType extends AbstractType | |||
'constraints' => [ | |||
new NotBlank(), | |||
], | |||
'attr' => [ | |||
"placeholder" => $placeholder | |||
] | |||
] | |||
); | |||
if ($options['thematic'] == true) { | |||
@@ -86,7 +94,8 @@ class DreamType extends AbstractType | |||
[ | |||
'data_class' => $this->em->getEntityName(DreamInterface::class), | |||
'context' => 'backend', | |||
'thematic' => true | |||
'thematic' => true, | |||
'placeholder_description' => false | |||
] | |||
); | |||
} |
@@ -31,6 +31,11 @@ class ProjectInspiringType extends AbstractType | |||
*/ | |||
public function buildForm(FormBuilderInterface $builder, array $options) | |||
{ | |||
$placeholder = ""; | |||
if (isset($options['placeholder_description'])) { | |||
$placeholder = $options['placeholder_description']; | |||
} | |||
$builder->add( | |||
'description', | |||
TextareaType::class, | |||
@@ -39,6 +44,9 @@ class ProjectInspiringType extends AbstractType | |||
'constraints' => [ | |||
new NotBlank(), | |||
], | |||
'attr' => [ | |||
"placeholder" => $placeholder | |||
] | |||
] | |||
); | |||
@@ -87,7 +95,8 @@ class ProjectInspiringType extends AbstractType | |||
[ | |||
'data_class' => $this->em->getEntityName(ProjectInspiringInterface::class), | |||
'context' => 'backend', | |||
'thematic' => true | |||
'thematic' => true, | |||
'placeholder_description' => false | |||
] | |||
); | |||
} |