<commit_before><?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of class SocieteModificationForm
 * @author mathurin
 */
class EtablissementModificationForm extends acCouchdbObjectForm {

    private $etablissement;
    private $liaisons_operateurs = null;

    public function __construct(Etablissement $etablissement, $options = array(), $CSRFSecret = null) {
        $this->etablissement = $etablissement;
        $this->liaisons_operateurs = $etablissement->liaisons_operateurs;
        parent::__construct($etablissement, $options, $CSRFSecret);
        if($this->etablissement->isNew()){
            $this->setDefault('adresse_societe', 1);
            $this->setDefault('exclusion_drm', 'non');
        }else{
            $this->setDefault('adresse_societe', (int) $this->etablissement->isSameContactThanSociete());
        }
    }

    public function configure() {
        $this->setWidget('nom', new sfWidgetFormInput());
        $this->setWidget('statut', new sfWidgetFormChoice(array('choices' => $this->getStatuts(), 'multiple' => false, 'expanded' => true)));
        $this->setWidget('region', new sfWidgetFormChoice(array('choices' => $this->getRegions())));
        $this->embedForm('liaisons_operateurs', new LiaisonsItemForm($this->getObject()->liaisons_operateurs));
        $this->setWidget('no_accises', new sfWidgetFormInput());
        $this->setWidget('commentaire', new sfWidgetFormTextarea(array(), array('style' => 'width: 100%;resize:none;')));
        $this->setWidget('site_fiche', new sfWidgetFormInput());
<commit_msg>le champs raisins et mouts à "non" par défaut<commit_after><?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of class SocieteModificationForm
 * @author mathurin
 */
class EtablissementModificationForm extends acCouchdbObjectForm {

    private $etablissement;
    private $liaisons_operateurs = null;

    public function __construct(Etablissement $etablissement, $options = array(), $CSRFSecret = null) {
        $this->etablissement = $etablissement;
        $this->liaisons_operateurs = $etablissement->liaisons_operateurs;
        parent::__construct($etablissement, $options, $CSRFSecret);
        if($this->etablissement->isNew()){
            $this->setDefault('adresse_societe', 1);
            $this->setDefault('exclusion_drm', 'non');            
            $this->setDefault('raisins_mouts', 'non');
        }else{
            $this->setDefault('adresse_societe', (int) $this->etablissement->isSameContactThanSociete());
        }
    }

    public function configure() {
        $this->setWidget('nom', new sfWidgetFormInput());
        $this->setWidget('statut', new sfWidgetFormChoice(array('choices' => $this->getStatuts(), 'multiple' => false, 'expanded' => true)));
        $this->setWidget('region', new sfWidgetFormChoice(array('choices' => $this->getRegions())));
        $this->embedForm('liaisons_operateurs', new LiaisonsItemForm($this->getObject()->liaisons_operateurs));
        $this->setWidget('no_accises', new sfWidgetFormInput());
        $this->setWidget('commentaire', new sfWidgetFormTextarea(array(), array('style' => 'width: 100%;resize:none;')));
        $this->setWidget('site_fiche', new sfWidgetFormInput());

{'fraction_non_alphanumeric': 0.1534107834375931, 'fraction_numerical': 0.002383080131069407, 'mean_word_length': 4.1503067484662575, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 56, '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': '3947507', 'n_tokens_mistral': 999, 'n_tokens_neox': 995, 'n_words': 184}