Commit 909ccc1d authored by Mat's avatar Mat
Browse files

LettreType, formattage initial

parent 991203d4
......@@ -4,6 +4,10 @@ namespace PotageBundle\Form\Lettre;
use PotageBundle\Entity\Lettre;
use Symfony\Component\Form\AbstractType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
......@@ -12,6 +16,52 @@ class LettreType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('offre', EntityType::class, array(
'label' => "Offre",
'label_attr' => array('class' => 'col-form-label'),
'attr' => array('class' => 'form-control form-control-sm'),
));
$builder->add('infos', EntityType::class, array(
'label' => "Infos",
'label_attr' => array('class' => 'col-form-label'),
'attr' => array('class' => 'form-control form-control-sm'),
));
$builder->add('groupe', ChoiceType::class, array(
'label' => "Groupe",
'label_attr' => array('class' => 'col-form-label'),
'attr' => array('class' => 'form-control form-control-sm'),
));
$builder->add('reference', TextType::class, array(
'label' => "Référence",
'label_attr' => array('class' => 'col-form-label'),
'attr' => array('class' => 'form-control form-control-sm'),
));
$builder->add('subject', TextType::class, array(
'label' => "Sujet",
'label_attr' => array('class' => 'col-form-label'),
'attr' => array('class' => 'form-control form-control-sm'),
));
$builder->add('started_at', DateType::class, array(
'label' => "Début",
'label_attr' => array('class' => 'col-form-label'),
'attr' => array('class' => 'form-control form-control-sm'),
));
$builder->add('ended_at', DateType::class, array(
'label' => "Fin",
'label_attr' => array('class' => 'col-form-label'),
'attr' => array('class' => 'form-control form-control-sm'),
));
$builder->add('status', ChoiceType::class, array(
'label' => 'Statut',
'label_attr' => array('class' => 'col-form-label'),
'attr' => array('class' => 'form-control form-control-sm'),
'choices' => array(
'En préparation' => 'draft',
'Envoyer' => 'current',
), // enum ('draft', 'current', 'sent', 'closed', 'trash')
));
$builder->add('sauver', SubmitType::class, array(
'label' => 'Enregistrer',
'attr' => array('class' => 'btn btn-dark mb-2')
......
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