示例#1
0
 public function init()
 {
     parent::init();
     $this->addAttribs(array('class' => 'seotoaster-signup', 'id' => 'seotoaster-signup-form'));
     $this->removeElement('roleId');
     $saveButton = $this->getElement('saveUser');
     $this->removeElement('saveUser');
     $this->removeElement('gplusProfile');
     $this->addElement(new Zend_Form_Element_Captcha('verification', array('label' => "Please verify you're a human", 'captcha' => array('captcha' => 'Image', 'font' => 'system/fonts/Alcohole.ttf', 'imgDir' => 'tmp', 'imgUrl' => 'tmp', 'dotNoiseLevel' => 0, 'lineNoiseLevel' => 0, 'wordLen' => 5, 'timeout' => 300))));
     $this->getElement('email')->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'user', 'field' => 'email')));
     $this->addElement($saveButton->setLabel('Sign Up'));
     $this->_initDecorators();
 }