mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
fix errors in editing custom field group
This commit is contained in:
parent
51460be132
commit
122e54eed6
@ -31,6 +31,7 @@ use Chill\MainBundle\Templating\TranslatableStringHelper;
|
|||||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
||||||
@ -77,7 +78,7 @@ class CustomFieldText extends AbstractCustomField
|
|||||||
{
|
{
|
||||||
$options = $customField->getOptions();
|
$options = $customField->getOptions();
|
||||||
|
|
||||||
$type = ($options[self::MAX_LENGTH] < 256) ? 'text'
|
$type = ($options[self::MAX_LENGTH] < 256) ? TextType::class
|
||||||
: TextareaType::class;
|
: TextareaType::class;
|
||||||
|
|
||||||
$attrArray = array();
|
$attrArray = array();
|
||||||
|
@ -25,7 +25,6 @@ use Symfony\Component\Form\FormEvent;
|
|||||||
use Symfony\Component\Form\FormEvents;
|
use Symfony\Component\Form\FormEvents;
|
||||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||||
use Symfony\Component\Form\FormInterface;
|
use Symfony\Component\Form\FormInterface;
|
||||||
use Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList;
|
|
||||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -109,7 +108,7 @@ class LinkedCustomFieldsType extends AbstractType
|
|||||||
}
|
}
|
||||||
|
|
||||||
$options = array_merge($this->options, array(
|
$options = array_merge($this->options, array(
|
||||||
'choice_list' => new SimpleChoiceList($choices),
|
'choices' => $choices,
|
||||||
'choices_as_values' => true
|
'choices_as_values' => true
|
||||||
));
|
));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user