<?php
namespace App\Form;
use App\Entity\Billing;
use App\Entity\Client;
use App\Entity\Site;
use App\Form\Client\BillingInfosType;
use App\Form\Client\FamilyMemberType;
use Doctrine\ORM\EntityRepository;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use VictorPrdh\RecaptchaBundle\Form\ReCaptchaType;
class RelanceFactureType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder ->add('status', ChoiceType::class, [
'label' => 'Statut',
'required' => false,
'placeholder' => 'Choisir un statut',
'choices'=> [
'Validée' => Billing::STATUS_VALIDE,
'Envoyée' => Billing::STATUS_SENT,
'Reglée' => Billing::STATUS_REGLEE,
'Contentieux' => Billing::STATUS_CONTENTIEUX,
],
'mapped' => false
])
->add('start', TextType::class, [
'label' => 'Choisir une date de début',
'required' => true,
'mapped' => false,
'attr' => [
'class' => 'flatpicker',
'placeholder' => 'Choisir une date de début',
],
'label_attr' => array('class' => ''),
])
->add('end', TextType::class, [
'label' => 'Choisir une date de fin',
'required' => true,
'mapped' => false,
'attr' => [
'class' => 'flatpicker',
'placeholder' => 'Choisir une date de fin',
],
'label_attr' => array('class' => ''),
]);
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => Client::class,
]);
}
}