<commit_before><?php

class ParcellaireValidationForm extends acCouchdbObjectForm {

    public function configure() {
        if(!$this->getObject()->isPapier() && $this->getObject()->hasProduitWithMultipleAcheteur()) {
            $this->setWidget('autorisation_acheteur', new sfWidgetFormInputCheckbox());
            $this->setValidator('autorisation_acheteur', new sfValidatorBoolean());
        }

        if($this->getObject()->isPapier()) {
            $this->setWidget('date', new sfWidgetFormInput());
            $this->setValidator('date', new sfValidatorDate(array('date_output' => 'Y-m-d', 'date_format' => '~(?P<day>\d{2})/(?P<month>\d{2})/(?P<year>\d{4})~', 'required' => true)));
            $this->getWidget('date')->setLabel("Date de réception du document");
            $this->getValidator('date')->setMessage("required", "La date de réception du document est requise");
        }<commit_msg>Revert "check multiple acheteurs popup formulaire validation parcellaire"<commit_after><?php

class ParcellaireValidationForm extends acCouchdbObjectForm {

    public function configure() {
        if(!$this->getObject()->isPapier()) {
            $this->setWidget('autorisation_acheteur', new sfWidgetFormInputCheckbox());
            $this->setValidator('autorisation_acheteur', new sfValidatorBoolean());
        }

        if($this->getObject()->isPapier()) {
            $this->setWidget('date', new sfWidgetFormInput());
            $this->setValidator('date', new sfValidatorDate(array('date_output' => 'Y-m-d', 'date_format' => '~(?P<day>\d{2})/(?P<month>\d{2})/(?P<year>\d{4})~', 'required' => true)));
            $this->getWidget('date')->setLabel("Date de réception du document");
            $this->getValidator('date')->setMessage("required", "La date de réception du document est requise");
        }
{'fraction_non_alphanumeric': 0.18326039387308535, 'fraction_numerical': 0.0032822757111597373, 'mean_word_length': 3.943243243243243, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 41, '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': '2897247', 'n_tokens_mistral': 542, 'n_tokens_neox': 537, 'n_words': 90}