'Sols-Violette', '1' => 'Carte bancaire', '2' => 'Chèque', '3' => 'Espèces'); static public $PAYMENT_AMOUNT = array( '0' => '5', '1' => '15', '2' => '100'); public function configure() { parent::configure(); // unset($this->validatorSchema['id']); // unset($this->widgetSchema['id']); $this->widgetSchema['year'] = new wpWidgetFormRichDate(); $this->validatorSchema['year'] = new sfValidatorDateTime(array('date_format' => '@(?P\d{2}).(?P\d{2}).(?P\d{4})@')); $this->widgetSchema['katao_user_id'] = new sfWidgetFormInputHidden(); $this->widgetSchema['type'] = new sfWidgetFormSelectRadio(array('choices' => array('1' => 'Nouvelle adhésion', '2' => 'Renouvellement'))); $this->validatorSchema['type'] = new sfValidatorString(array('max_length' => 255), array('required' => 'Choisissez le type d\'adhésion')); $this->widgetSchema['amount'] = new sfWidgetFormInput(); $this->validatorSchema['amount'] = new sfValidatorString(array('max_length' => 255), array('required' => 'Veuillez entrer le montant')); $this->widgetSchema['payment_kind'] = new sfWidgetFormSelectRadio(array('choices' => self::$PAYMENT_KIND)); $this->validatorSchema['payment_kind'] = new sfValidatorString(array('max_length' => 255), array('required' => 'Veuillez choisir le mode de paiment')); $this->widgetSchema['check_no'] = new sfWidgetFormInput(); $this->validatorSchema['check_no'] = new sfValidatorPass(); $this->widgetSchema->setLabels(array( 'year' => 'Date d\'adhésion', 'amount' => 'Montant', 'type' => 'Type d\'adhésion', 'payment_kind' => 'Mode de paiment', 'check_no' => 'Numéro de chèque' )); $this->widgetSchema->setNameFormat('form_subscription[%s]'); } }