Commit 62a64004 authored by Mat's avatar Mat
Browse files

fixe la hauteur des textarea

parent 118703b9
...@@ -17,28 +17,27 @@ class InfoType extends AbstractType ...@@ -17,28 +17,27 @@ class InfoType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {
// title varchar(150) not null,
$builder->add('title', TextType::class, array( $builder->add('title', TextType::class, array(
'label' => "Titre", 'label' => "Titre",
'label_attr' => array('class' => 'col-form-label'), 'label_attr' => array('class' => 'col-form-label'),
'attr' => array('class' => 'form-control form-control-sm'), 'attr' => array('class' => 'form-control form-control-sm'),
)); ));
// subtitle varchar(150) not null,
$builder->add('subtitle', TextType::class, array( $builder->add('subtitle', TextType::class, array(
'label' => "Soustitre", 'label' => "Soustitre",
'label_attr' => array('class' => 'col-form-label'), 'label_attr' => array('class' => 'col-form-label'),
'attr' => array('class' => 'form-control form-control-sm'), 'attr' => array('class' => 'form-control form-control-sm'),
)); ));
// text longtext not null,
$builder->add('text', TextareaType::class, array( $builder->add('text', TextareaType::class, array(
'label' => "Texte", 'label' => "Texte",
'label_attr' => array('class' => 'col-form-label'), 'label_attr' => array('class' => 'col-form-label'),
'attr' => array('class' => 'form-control form-control-sm'), 'attr' => array(
'class' => 'form-control form-control-sm',
'rows' => '7',
),
)); ));
// isPost tinyint(1) not null,
$builder->add('isPost', ChoiceType::class, array( $builder->add('isPost', ChoiceType::class, array(
'label' => "Actualité ou Info pratique ?", 'label' => "Actualité ou Info pratique ?",
'choices' => array( 'choices' => array(
...@@ -49,7 +48,6 @@ class InfoType extends AbstractType ...@@ -49,7 +48,6 @@ class InfoType extends AbstractType
'attr' => array('class' => 'form-control form-control-sm'), 'attr' => array('class' => 'form-control form-control-sm'),
)); ));
// postedAt
// TODO doit apparaitre seulement si actualité est coché ! // TODO doit apparaitre seulement si actualité est coché !
$builder->add('postedAt', DateTimeType::class, array( $builder->add('postedAt', DateTimeType::class, array(
'label' => "Date de publication", 'label' => "Date de publication",
...@@ -60,7 +58,6 @@ class InfoType extends AbstractType ...@@ -60,7 +58,6 @@ class InfoType extends AbstractType
'attr' => array('class' => 'form-control form-control-sm'), 'attr' => array('class' => 'form-control form-control-sm'),
)); ));
// status enum ('draft', 'posted', 'trash') null,
$builder->add('status', ChoiceType::class, array( $builder->add('status', ChoiceType::class, array(
'label' => "Statut", 'label' => "Statut",
'choices' => array( 'choices' => array(
...@@ -73,14 +70,12 @@ class InfoType extends AbstractType ...@@ -73,14 +70,12 @@ class InfoType extends AbstractType
'attr' => array('class' => 'form-control form-control-sm'), 'attr' => array('class' => 'form-control form-control-sm'),
)); ));
// color varchar(10) not null,
$builder->add('color', TextType::class, array( $builder->add('color', TextType::class, array(
'label' => "Couleur du texte", 'label' => "Couleur du texte",
'label_attr' => array('class' => 'col-form-label'), 'label_attr' => array('class' => 'col-form-label'),
'attr' => array('class' => 'form-control form-control-sm'), 'attr' => array('class' => 'form-control form-control-sm'),
)); ));
$builder->add('sauver', SubmitType::class, array( $builder->add('sauver', SubmitType::class, array(
'label' => 'Enregistrer', 'label' => 'Enregistrer',
'attr' => array('class' => 'btn btn-dark mb-2') 'attr' => array('class' => 'btn btn-dark mb-2')
......
...@@ -47,6 +47,7 @@ class LegumeType extends AbstractType ...@@ -47,6 +47,7 @@ class LegumeType extends AbstractType
'label_attr' => array('class' => 'col-form-label'), 'label_attr' => array('class' => 'col-form-label'),
'attr' => array( 'attr' => array(
'class' => 'form-control form-control-sm', 'class' => 'form-control form-control-sm',
'rows' => '4',
), ),
)); ));
$builder->add('revente', CheckboxType::class, array( $builder->add('revente', CheckboxType::class, array(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment