<commit_before><?php

namespace AppBundle\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\NumberType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Doctrine\Bundle\MongoDBBundle\Form\Type\DocumentType;
use Symfony\Component\DependencyInjection\ContainerInterface;
use AppBundle\Type\PrestationType;
use AppBundle\Document\Compte;
use AppBundle\Manager\ContratManager;
use Doctrine\ODM\MongoDB\DocumentManager;
use Symfony\Component\Form\CallbackTransformer;
use AppBundle\Transformer\EtablissementsTransformer;
use AppBundle\Transformer\InterlocuteurTransformer;
use AppBundle\Transformer\ProduitTransformer;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormInterface;

class ContratType extends AbstractType {

    protected $container;
    protected $dm;

    public function __construct(ContainerInterface $container, DocumentManager $documentManager) {
        $this->container = $container;
        $this->dm = $documentManager;
    }

    /**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options) {
        $builder
                ->add('typeContrat', ChoiceType::class, array('label' => 'Type de contrat* :', 'choices' => array_merge(array('' => ''), ContratManager::$types_contrat_libelles), "attr" => array("class" => "select2 select2-simple")))
                ->add('nomenclature', TextareaType::class, array('label' => 'Nomenclature* :', "attr" => array("class" => "form-control", "rows" => 6)))
                ->add('duree', TextType::class, array('label' => 'Durée du contrat* :'))
                ->add('auditPassage', TextType::class, array('label' => 'Audit commercial au passage n° :', 'required' => false))
                ->add('multiTechnicien', TextType::class, array('label' => 'Nombre de techniciens :', 'required' => false))
                ->add('duree_garantie', TextType::class, array('required' => false, 'label' => 'Durée de la garantie :'))
                ->add('nbFactures', TextType::class, array('label' => 'Nombre de factures (associés à un passage)* :'))
                ->add('dureePassage', TextType::class, array('label' => 'Durée estimative d\'un passage* :', 'attr' => array('class' => 'input-timepicker')))
                ->add('prixHt', NumberType::class, array('label' => 'Prix HT* :', 'scale' => 2))
                ->add('tvaReduite', CheckboxType::class, array('label' => 'Tva réduite', 'required' => false, 'label_attr' => array('class' => 'control-label')));

        $builder->add('devisInterlocuteur', ChoiceType::class, array('label' => 'Adresse du devis* : ',<commit_msg>champ type de contrat obligatoire<commit_after><?php

namespace AppBundle\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\NumberType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Doctrine\Bundle\MongoDBBundle\Form\Type\DocumentType;
use Symfony\Component\DependencyInjection\ContainerInterface;
use AppBundle\Type\PrestationType;
use AppBundle\Document\Compte;
use AppBundle\Manager\ContratManager;
use Doctrine\ODM\MongoDB\DocumentManager;
use Symfony\Component\Form\CallbackTransformer;
use AppBundle\Transformer\EtablissementsTransformer;
use AppBundle\Transformer\InterlocuteurTransformer;
use AppBundle\Transformer\ProduitTransformer;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormInterface;

class ContratType extends AbstractType {

    protected $container;
    protected $dm;

    public function __construct(ContainerInterface $container, DocumentManager $documentManager) {
        $this->container = $container;
        $this->dm = $documentManager;
    }

    /**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options) {
        $builder
                ->add('typeContrat', ChoiceType::class, array('label' => 'Type de contrat* :','required' => true, 'choices' => array_merge(array('' => ''), ContratManager::$types_contrat_libelles), "attr" => array("class" => "select2 select2-simple")))
                ->add('nomenclature', TextareaType::class, array('label' => 'Nomenclature* :', "attr" => array("class" => "form-control", "rows" => 6)))
                ->add('duree', TextType::class, array('label' => 'Durée du contrat* :'))
                ->add('auditPassage', TextType::class, array('label' => 'Audit commercial au passage n° :', 'required' => false))
                ->add('multiTechnicien', TextType::class, array('label' => 'Nombre de techniciens :', 'required' => false))
                ->add('duree_garantie', TextType::class, array('required' => false, 'label' => 'Durée de la garantie :'))
                ->add('nbFactures', TextType::class, array('label' => 'Nombre de factures (associés à un passage)* :'))
                ->add('dureePassage', TextType::class, array('label' => 'Durée estimative d\'un passage* :', 'attr' => array('class' => 'input-timepicker')))
                ->add('prixHt', NumberType::class, array('label' => 'Prix HT* :', 'scale' => 2))
                ->add('tvaReduite', CheckboxType::class, array('label' => 'Tva réduite', 'required' => false, 'label_attr' => array('class' => 'control-label')));

        $builder->add('devisInterlocuteur', ChoiceType::class, array('label' => 'Adresse du devis* : ',
{'fraction_non_alphanumeric': 0.15205669388383916, 'fraction_numerical': 0.0012324757356339548, 'mean_word_length': 4.572532188841202, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 84, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5384324', 'n_tokens_mistral': 1962, 'n_tokens_neox': 1903, 'n_words': 366}