MailTemplateForm.class.php 1.18 KB
Newer Older
Игорь's avatar
init    
Игорь committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php

/**
 * MailTemplate form.
 *
 * @package    sf
 * @subpackage form
 * @author     Atma
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class MailTemplateForm extends BaseMailTemplateForm
{
  public function configure()
  {
      $this->useFields(array('theme', 'copy', 'body'));

      $this->widgetSchema['theme'] = new sfWidgetFormInputText(array(), array("size" => 64, "maxlength" => 255, "required" => true));
      $this->widgetSchema['copy'] = new sfWidgetFormInputText(array(), array("size" => 64, "maxlength" => 255));
      $this->widgetSchema['body'] = new sfWidgetFormTextarea(array(), array("rows" => 5, "cols" => 70, "required" => true, "class" => "rich"));
      $this->validatorSchema['theme'] = new sfValidatorString(array('max_length' => 255));
      $this->validatorSchema['copy'] = new sfValidatorString(array('max_length' => 1000, 'required' => false));
      $this->validatorSchema['body'] =new sfValidatorString(array('max_length' => 5000));

      $this->widgetSchema->setHelps(array('copy' => 'Возможен ввод нескольких адресов электронной почты через запятую'));
  }
}