SolVioletteTransferStep2Form.class.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. class SolVioletteTransferStep2Form extends sfForm {
  3. public function setup()
  4. {
  5. $this->setWidgets(array(
  6. 'id' => new sfWidgetFormInputHidden(),
  7. 'amount' => new sfWidgetFormInputHidden(),
  8. 'message' => new sfWidgetFormTextarea(array(), array('cols' => 54))
  9. ));
  10. $this->setValidators(array(
  11. 'id' => new sfValidatorString(),
  12. 'amount' => new sfValidatorString(),
  13. 'message' => new sfValidatorPass(),
  14. ));
  15. $this->getWidgetSchema()->setLabels(array(
  16. 'id' => FALSE,
  17. 'amount' => FALSE,
  18. 'message' => FALSE,
  19. ));
  20. $this->getWidgetSchema()->setHelp('message','<span class="hint">Laissez le champ vide pour qu\'aucun email ne soit envoyé.</span>');
  21. $this->widgetSchema->setNameFormat('confirm[%s]');
  22. $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
  23. parent::setup();
  24. }
  25. }