mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 05:44:58 +00:00
change order for title in stored object
This commit is contained in:
@@ -41,6 +41,13 @@ class StoredObjectType extends AbstractType
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
if (true === $options['has_title']) {
|
||||
$builder
|
||||
->add('title', TextType::class, [
|
||||
'label' => 'Title',
|
||||
]);
|
||||
}
|
||||
|
||||
$builder
|
||||
->add('filename', AsyncUploaderType::class)
|
||||
->add('type', HiddenType::class)
|
||||
@@ -65,13 +72,6 @@ class StoredObjectType extends AbstractType
|
||||
[$this, 'transformObject'],
|
||||
[$this, 'reverseTransformObject']
|
||||
));
|
||||
|
||||
if ($options['has_title']) {
|
||||
$builder
|
||||
->add('title', TextType::class, [
|
||||
'label' => 'Title',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
@@ -81,7 +81,7 @@ class StoredObjectType extends AbstractType
|
||||
|
||||
$resolver
|
||||
->setDefault('has_title', false)
|
||||
->addAllowedValues('has_title', [true, false]);
|
||||
->setAllowedTypes('has_title', ['bool']);
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
|
Reference in New Issue
Block a user