Beispiel #1
0
 public function init()
 {
     $this->setAction($this->_actionUrl)->setMethod('post')->setAttrib('class', 'simpleForm');
     $this->clearDecorators();
     $aFieldDecorators = array(array('ViewHelper'), array('Errors'), array('HtmlTag', array('tag' => 'li')));
     $aButtonDecorators = array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li', 'class' => 'submit')));
     $aDefaultDecorators = array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li', 'class' => '')));
     $oTitleNote = new Zend_Form_Element_Note('title_label');
     $oTitleNote->setValue('<h1>Login</h1>')->setDecorators($aDefaultDecorators);
     $this->addElement($oTitleNote);
     $oUsernameNote = new Zend_Form_Element_Note('username_label');
     $oUsernameNote->setValue('Username *')->setDecorators($aDefaultDecorators);
     $this->addElement($oUsernameNote);
     $this->addElement('text', 'username');
     $this->getElement('username')->setRequired(true)->addFilter('StringTrim')->addPrefixPath('Custom_Validate', 'Custom/Validate/', 'validate')->addValidator('Authorise')->setDecorators($aFieldDecorators);
     $oPassNote = new Zend_Form_Element_Note('password_label');
     $oPassNote->setValue('Password *')->setDecorators($aDefaultDecorators);
     $this->addElement($oPassNote);
     $this->addElement('password', 'password');
     $this->getElement('password')->setRequired(true)->addFilter('StringTrim')->setDecorators($aFieldDecorators);
     $oForgotPassNote = new Zend_Form_Element_Note('forgot_password');
     $oForgotPassNote->setValue('<a href="' . $this->getView()->serverUrl($this->getView()->url(array('controller' => 'login', 'action' => 'forgotpass'), null, true)) . '">Forgotten Username/Password?</a>')->setDecorators($aDefaultDecorators);
     $this->addElement($oForgotPassNote);
     $this->addElement('submit', 'Login');
     $this->getElement('Login')->setDecorators($aButtonDecorators);
     $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')), array(array('DivTag' => 'HtmlTag'), array('tag' => 'div', 'class' => 'loginDiv')), 'Form'));
 }
 public function init()
 {
     $this->setAction($this->_actionUrl)->setMethod('post')->setAttrib('class', 'form')->setAttrib('id', 'edit-account');
     $this->clearDecorators();
     $fieldDecorators = array(array('ViewHelper'), array('Errors'), array('HtmlTag', array('tag' => 'li')));
     $buttonDecorators = array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li', 'class' => 'submit')));
     $defaultDecorators = array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li', 'class' => '')));
     $noUsernameDuplicateValidator = new Zend_Validate_Db_NoRecordExists(array('table' => 'sys_user_roles', 'field' => 'username', 'adapter' => Zend_Registry::get('db'), 'exclude' => array('field' => 'id', 'value' => $this->userRoleId)));
     $this->addElement('hidden', 'id')->setDecorators($fieldDecorators);
     //account information
     $accountNote = new Zend_Form_Element_Note('account_info');
     $accountNote->setValue('<h3>Account Information</h3>')->setDecorators($defaultDecorators);
     $this->addElement($accountNote);
     //username
     $usernameNote = new Zend_Form_Element_Note('username_label');
     $usernameNote->setValue('Username')->setDecorators($defaultDecorators);
     $this->addElement($usernameNote);
     //username field
     $this->addElement('text', 'username');
     $this->getElement('username')->setRequired(true)->addFilter('StringTrim')->addValidator($noUsernameDuplicateValidator)->setDecorators($fieldDecorators);
     //login button
     $this->addElement('submit', 'save');
     $this->getElement('save')->setLabel('Save')->setDecorators($buttonDecorators);
     $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')), array(array('DivTag' => 'HtmlTag'), array('tag' => 'div', 'class' => 'loginDiv')), 'Form'));
 }
Beispiel #3
0
 public function init()
 {
     $this->setAction($this->_actionUrl)->setMethod('post')->setAttrib('class', 'form')->setAttrib('id', 'edit-house');
     $this->clearDecorators();
     $fieldDecorators = array(array('ViewHelper'), array('Errors'), array('HtmlTag', array('tag' => 'li')));
     $buttonDecorators = array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li', 'class' => 'submit')));
     $defaultDecorators = array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li', 'class' => '')));
     $this->addElement('hidden', 'id')->setDecorators($fieldDecorators);
     //team information title
     $titleNote = new Zend_Form_Element_Note('house-info');
     $titleNote->setValue('<h3>House Information</h3>')->setDecorators($defaultDecorators);
     $this->addElement($titleNote);
     //name label
     $nameLabel = new Zend_Form_Element_Note('nameLabel');
     $nameLabel->setValue('Name')->setDecorators($defaultDecorators);
     $this->addElement($nameLabel);
     //name field
     $this->addElement('text', 'name');
     $this->getElement('name')->setRequired(true)->addFilter('StringTrim')->setDecorators($fieldDecorators);
     //description label
     $descriptionLabel = new Zend_Form_Element_Note('descriptionLabel');
     $descriptionLabel->setValue('Description')->setDecorators($defaultDecorators);
     $this->addElement($descriptionLabel);
     //description text area
     $this->addElement('textarea', 'description');
     $this->getElement('description')->setRequired(true)->addFilter('StringTrim')->setDecorators($fieldDecorators);
     //login button
     $this->addElement('submit', 'save');
     $this->getElement('save')->setLabel('Save')->setDecorators($buttonDecorators);
     $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')), array(array('DivTag' => 'HtmlTag'), array('tag' => 'div', 'class' => 'loginDiv')), 'Form'));
 }
 public function init()
 {
     $this->setAction($this->_actionUrl)->setMethod('post');
     $this->clearDecorators();
     $linkDecorators = array(array('ViewHelper'), array(array('div' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-div')));
     $inputDecorators = array(array('ViewHelper'), array('Errors'), array(array('div' => 'HtmlTag'), array('tag' => 'div')));
     $buttonDecorators = array(array('ViewHelper'), array(array('div' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-block')));
     $this->addElement('hidden', 'sendlogin');
     $this->getElement('sendlogin')->setDecorators($linkDecorators);
     $this->addElement('text', 'username');
     $this->getElement('username')->setRequired(true)->addFilter('StringTrim')->addPrefixPath('Custom_Validate', 'Custom/Validate/', 'validate')->addValidator('Authorise')->setDecorators($inputDecorators);
     $registerLink = new Zend_Form_Element_Note('register_user');
     $registerLink->setValue('<a href="' . $this->getView()->serverUrl($this->getView()->url(array('controller' => 'users', 'action' => 'registeruser'), null, true)) . '">Not Yet Registered?</a>')->setDecorators($linkDecorators);
     $this->addElement($registerLink);
     $this->addDisplayGroup(array('username', 'register_user'), 'firstColumn', array('disableLoadDefaultDecorators' => true));
     $columnDecorator = array(array('FormElements'), array(array('div' => 'HtmlTag'), array('tag' => 'div', 'class' => 'login-form-block')));
     $this->getDisplayGroup('firstColumn')->setDecorators($columnDecorator);
     $this->addElement('password', 'password');
     $this->getElement('password')->setRequired(true)->addFilter('StringTrim')->setDecorators($inputDecorators);
     $forgotPasswordLink = new Zend_Form_Element_Note('forgot_password');
     $forgotPasswordLink->setValue('<a href="' . $this->getView()->serverUrl($this->getView()->url(array('controller' => 'users', 'action' => 'forgotpass'), null, true)) . '">Forget Password?</a>')->setDecorators($linkDecorators);
     $this->addElement($forgotPasswordLink);
     $this->addDisplayGroup(array('password', 'forgot_password'), 'secondColumn', array('disableLoadDefaultDecorators' => true));
     $this->getDisplayGroup('secondColumn')->setDecorators($columnDecorator);
     $this->addElement('submit', 'login');
     $this->getElement('login')->setLabel('SIGN IN')->setAttrib("class", "search_btn")->setDecorators($buttonDecorators);
     $this->setDecorators(array('FormElements', 'Form'));
 }
 public function init()
 {
     $this->setAction($this->_actionUrl)->setMethod('post')->setAttrib('class', 'form')->setAttrib('id', 'edit-privilege');
     $this->clearDecorators();
     $fieldDecorators = array(array('ViewHelper'), array('Errors'), array('HtmlTag', array('tag' => 'li')));
     $buttonDecorators = array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li', 'class' => 'submit')));
     $defaultDecorators = array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li', 'class' => '')));
     $this->addElement('hidden', 'id')->setDecorators($fieldDecorators);
     //privilege information
     $accountNote = new Zend_Form_Element_Note('account_info');
     $accountNote->setValue('<h3>Privilege Information</h3>')->setDecorators($defaultDecorators);
     $this->addElement($accountNote);
     //role field
     $roles = new Zend_Form_Element_Select('sys_role_id');
     $roles->setLabel("Roles")->addMultiOptions(array('1' => 'Administrator', '2' => 'Scrum Master', '3' => 'Member'));
     $roles->setDecorators($fieldDecorators);
     $this->addElement($roles);
     //login button
     $this->addElement('submit', 'save');
     $this->getElement('save')->setDecorators($buttonDecorators);
     $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')), array(array('DivTag' => 'HtmlTag'), array('tag' => 'div', 'class' => 'loginDiv')), 'Form'));
 }
Beispiel #6
0
 public function init()
 {
     $key_id = new Zend_Form_Element_Note('key_id');
     $key_id->setLabel('Key');
     $this->addElement($key_id);
     $country_id = new Zend_Form_Element_Note('language_id');
     $country_id->setLabel('Language');
     $this->addElement($country_id);
     $value = new My_Form_Element_CKEditor('value');
     $value->setLabel('Translation');
     $value->setDescription('Tags for dynamic values: {1}, {2}, {3}...Double quotes (")are not allowed');
     $this->addElement($value);
     $cancel = new Zend_Form_Element_Button('cancel');
     $cancel->setLabel('Cancel');
     $cancel->setAttrib('class', 'btn btn-gold')->setAttrib('style', 'color:black');
     $cancel->setAttrib("onClick", "window.location = window.location.origin+'/locale/translate-messages/'");
     $this->addElement($cancel);
     $submit = new Zend_Form_Element_Submit('save');
     $submit->setAttrib('class', 'btn btn-primary');
     $submit->setLabel('Confirm');
     $this->setAction('')->setMethod('post')->addElement($submit);
 }
 public function init()
 {
     $this->setAction($this->_actionUrl)->setMethod('post')->setAttrib('class', 'form')->setAttrib('id', 'change-password');
     $this->clearDecorators();
     $fieldDecorators = array(array('ViewHelper'), array('Errors'), array('HtmlTag', array('tag' => 'li')));
     $buttonDecorators = array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li', 'class' => 'submit')));
     $defaultDecorators = array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li', 'class' => '')));
     $currentPasswordValidator = new Zend_Validate_Db_RecordExists(array('table' => 'sys_user_roles', 'field' => 'password', 'adapter' => Zend_Registry::get('db'), 'exclude' => "id = " . $this->userRoleId));
     $newPasswordValidator = new Zend_Validate_Db_NoRecordExists(array('table' => 'sys_user_roles', 'field' => 'password', 'adapter' => Zend_Registry::get('db'), 'exclude' => "id = " . $this->userRoleId));
     $identicalValidator = new Zend_Validate_Identical();
     $identicalValidator->setStrict(false)->setToken('password');
     $passwordLengthValidator = new Zend_Validate_StringLength(array('min' => 1, 'max' => 10));
     //current password
     $changePasswordNote = new Zend_Form_Element_Note('changepass_info');
     $changePasswordNote->setValue('<h3>Current password</h3>')->setDecorators($defaultDecorators);
     $this->addElement($changePasswordNote);
     //current password field
     $this->addElement('password', 'current_password');
     $this->getElement('current_password')->setRequired(true)->addFilter('StringTrim')->addValidator($currentPasswordValidator)->setDecorators($fieldDecorators);
     //password
     $passwordNote = new Zend_Form_Element_Note('password_label');
     $passwordNote->setValue('<h3>New Password</h3>')->setDecorators($defaultDecorators);
     $this->addElement($passwordNote);
     //password field
     $this->addElement('password', 'password');
     $this->getElement('password')->setRequired(true)->addFilter('StringTrim')->addValidator($passwordLengthValidator)->addValidator($newPasswordValidator)->setDecorators($fieldDecorators);
     //duplicate password
     $duplicatePasswordNote = new Zend_Form_Element_Note('repassword_label');
     $duplicatePasswordNote->setValue('<h3>Type new password again</h3>')->setDecorators($defaultDecorators);
     $this->addElement($duplicatePasswordNote);
     //duplicate password field
     $this->addElement('password', 'repassword');
     $this->getElement('repassword')->setRequired(true)->addFilter('StringTrim')->addValidator($passwordLengthValidator)->addValidator('identical', false, array('token' => 'password'))->setDecorators($fieldDecorators);
     //login button
     $this->addElement('submit', 'save');
     $this->getElement('save')->setLabel('Save')->setDecorators($buttonDecorators);
     $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')), array(array('DivTag' => 'HtmlTag'), array('tag' => 'div', 'class' => 'loginDiv')), 'Form'));
 }
Beispiel #8
0
 public function init()
 {
     $this->setAction($this->_actionUrl)->setMethod('post')->setAttrib('class', 'simpleForm');
     $this->clearDecorators();
     $aFieldDecorators = array(array('ViewHelper'), array('Errors'), array('HtmlTag', array('tag' => 'li')));
     $aButtonDecorators = array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li', 'class' => 'submit')));
     $aDefaultDecorators = array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li', 'class' => '')));
     $oEmailDBValidator = new Zend_Validate_Db_RecordExists(array('table' => 'sys_users', 'field' => 'email_add', 'adapter' => Zend_Registry::get('db')));
     //reset password
     $oTitleNote = new Zend_Form_Element_Note('reset_label');
     $oTitleNote->setValue('<h1>Reset password</h1>')->setDecorators($aDefaultDecorators);
     $this->addElement($oTitleNote);
     //email address
     $oUsernameNote = new Zend_Form_Element_Note('email_label');
     $oUsernameNote->setValue('Please enter your email address')->setDecorators($aDefaultDecorators);
     $this->addElement($oUsernameNote);
     //email address field
     $this->addElement('text', 'email_add');
     $this->getElement('email_add')->setRequired(true)->addFilter('StringTrim')->addValidator($oEmailDBValidator)->setDecorators($aFieldDecorators);
     //login button
     $this->addElement('submit', 'Reset');
     $this->getElement('Reset')->setDecorators($aButtonDecorators);
     $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')), array(array('DivTag' => 'HtmlTag'), array('tag' => 'div', 'class' => 'loginDiv')), 'Form'));
 }
Beispiel #9
0
 public function init()
 {
     $this->setAction($this->_actionUrl)->setMethod('post')->setAttrib('class', 'form')->setAttrib('id', 'add-user');
     $this->clearDecorators();
     $fieldDecorators = array(array('ViewHelper'), array('Errors'), array('HtmlTag', array('tag' => 'li')));
     $buttonDecorators = array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li', 'class' => 'submit')));
     $defaultDecorators = array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li', 'class' => '')));
     $noDuplicateEmailValidator = new Custom_Validate_NoDuplicateEmailAddress(array('table' => 'sys_users', 'field' => 'email_add', 'adapter' => Zend_Registry::get('db')));
     $uniqueUsernameValidator = new Zend_Validate_Db_NoRecordExists(array('table' => 'sys_user_roles', 'field' => 'username', 'adapter' => Zend_Registry::get('db')));
     $emailFormatValidator = new Zend_Validate_EmailAddress();
     $initialLengthValidator = new Zend_Validate_StringLength(array('min' => 1, 'max' => 1));
     //personal information
     $titleNote = new Zend_Form_Element_Note('personal_info');
     $titleNote->setValue('<h3>Personal Information</h3>')->setDecorators($defaultDecorators);
     $this->addElement($titleNote);
     //lastname
     $lastnameNote = new Zend_Form_Element_Note('lastname_label');
     $lastnameNote->setValue('Lastname')->setDecorators($defaultDecorators);
     $this->addElement($lastnameNote);
     //lastname field
     $this->addElement('text', 'lastname');
     $this->getElement('lastname')->setRequired(true)->addFilter('StringTrim')->setDecorators($fieldDecorators);
     //firstname
     $firstnameNote = new Zend_Form_Element_Note('firstname_label');
     $firstnameNote->setValue('Firstname')->setDecorators($defaultDecorators);
     $this->addElement($firstnameNote);
     //firstname field
     $this->addElement('text', 'firstname');
     $this->getElement('firstname')->setRequired(true)->addFilter('StringTrim')->setDecorators($fieldDecorators);
     //middle initial
     $middleInitialNote = new Zend_Form_Element_Note('mi_label');
     $middleInitialNote->setValue('Middle Initial')->setDecorators($defaultDecorators);
     $this->addElement($middleInitialNote);
     //middle initial field
     $this->addElement('text', 'mi');
     $this->getElement('mi')->setRequired(true)->addFilter('StringTrim')->addValidator($initialLengthValidator)->setDecorators($fieldDecorators);
     //designation field
     $this->addElement('hidden', 'designation');
     $this->getElement('designation')->setValue('');
     //contact
     $contactNote = new Zend_Form_Element_Note('contact_label');
     $contactNote->setValue('Mobile number')->setDecorators($defaultDecorators);
     $this->addElement($contactNote);
     //contact field
     $this->addElement('text', 'contact');
     $this->getElement('contact')->setRequired(true)->addFilter('StringTrim')->addValidator(new Zend_Validate_Digits())->addValidator(new Zend_Validate_StringLength(array('min' => 7, 'max' => 11)))->setDecorators($fieldDecorators);
     //email address
     $emailNote = new Zend_Form_Element_Note('email_label');
     $emailNote->setValue('Email address')->setDecorators($defaultDecorators);
     $this->addElement($emailNote);
     //email address field
     $this->addElement('text', 'emailadd');
     $this->getElement('emailadd')->setRequired(true)->addFilter('StringTrim')->addValidator($noDuplicateEmailValidator)->addValidator($emailFormatValidator)->setDecorators($fieldDecorators);
     //account information
     $accountNote = new Zend_Form_Element_Note('account_info');
     $accountNote->setValue('<h3>Account Information</h3>')->setDecorators($defaultDecorators);
     $this->addElement($accountNote);
     //username
     $usernameNote = new Zend_Form_Element_Note('username_label');
     $usernameNote->setValue('Username')->setDecorators($defaultDecorators);
     $this->addElement($usernameNote);
     //username field
     $this->addElement('text', 'username');
     $this->getElement('username')->setRequired(true)->addFilter('StringTrim')->addValidator($uniqueUsernameValidator)->setDecorators($fieldDecorators);
     //password
     $passwordNote = new Zend_Form_Element_Note('password_label');
     $passwordNote->setValue('Password')->setDecorators($defaultDecorators);
     $this->addElement($passwordNote);
     //password field
     $this->addElement('password', 'password');
     $this->getElement('password')->setRequired(true)->addFilter('StringTrim')->setDecorators($fieldDecorators);
     //role
     $roleNote = new Zend_Form_Element_Note('role_label');
     $roleNote->setValue('Role')->setDecorators($defaultDecorators);
     $this->addElement($roleNote);
     //role field
     $roles = new Zend_Form_Element_Select('roles');
     $roles->setLabel("Roles")->addMultiOptions(array('0' => '', '1' => 'Administrator', '2' => 'Scrum Master', '3' => 'Member'));
     $roles->setDecorators($fieldDecorators);
     $this->addElement($roles);
     //login button
     $this->addElement('submit', 'save');
     $this->getElement('save')->setLabel('Save')->setDecorators($buttonDecorators);
     $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')), array(array('DivTag' => 'HtmlTag'), array('tag' => 'div', 'class' => 'loginDiv')), 'Form'));
 }
 public function init()
 {
     $this->setAction($this->_actionUrl)->setMethod('post')->setAttrib('class', 'form')->setAttrib('id', 'edit-personal');
     $this->clearDecorators();
     $fieldDecorators = array(array('ViewHelper'), array('Errors'), array('HtmlTag', array('tag' => 'li')));
     $buttonDecorators = array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li', 'class' => 'submit')));
     $defaultDecorators = array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li', 'class' => '')));
     $emailValidator = new Zend_Validate_EmailAddress();
     $initialValidator = new Zend_Validate_StringLength(array('min' => 1, 'max' => 1));
     $this->addElement('hidden', 'id')->setDecorators($fieldDecorators);
     //personal information
     $titleNote = new Zend_Form_Element_Note('personal_info');
     $titleNote->setValue('<h3>Personal Information</h3>')->setDecorators($defaultDecorators);
     $this->addElement($titleNote);
     //lastname
     $lastnameLabel = new Zend_Form_Element_Note('lastname_label');
     $lastnameLabel->setValue('Lastname')->setDecorators($defaultDecorators);
     $this->addElement($lastnameLabel);
     //lastname field
     $this->addElement('text', 'lastname');
     $this->getElement('lastname')->setRequired(true)->addFilter('StringTrim')->setDecorators($fieldDecorators);
     //firstname
     $firstnameLabel = new Zend_Form_Element_Note('firstname_label');
     $firstnameLabel->setValue('Firstname')->setDecorators($defaultDecorators);
     $this->addElement($firstnameLabel);
     //firstname field
     $this->addElement('text', 'firstname');
     $this->getElement('firstname')->setRequired(true)->addFilter('StringTrim')->setDecorators($fieldDecorators);
     //middle initial
     $miLabel = new Zend_Form_Element_Note('mi_label');
     $miLabel->setValue('Middle Initial')->setDecorators($defaultDecorators);
     $this->addElement($miLabel);
     //middle initial field
     $this->addElement('text', 'mi');
     $this->getElement('mi')->setRequired(true)->addFilter('StringTrim')->addValidator($initialValidator)->setDecorators($fieldDecorators);
     //designation
     $designationLabel = new Zend_Form_Element_Note('designation_label');
     $designationLabel->setValue('Designation')->setDecorators($defaultDecorators);
     $this->addElement($designationLabel);
     //designation field
     $designation = new Zend_Form_Element_Select('designation');
     $designation->setLabel("Designation")->addMultiOptions(array('' => '', 'Jr' => 'Jr', 'Sr' => 'Sr', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'));
     $designation->setDecorators($fieldDecorators);
     $this->addElement($designation);
     //contact
     $contactLabel = new Zend_Form_Element_Note('contact_label');
     $contactLabel->setValue('Contact number')->setDecorators($defaultDecorators);
     $this->addElement($contactLabel);
     //contact field
     $this->addElement('text', 'contacts');
     $this->getElement('contacts')->setRequired(true)->addFilter('StringTrim')->addValidator(new Zend_Validate_Digits())->addValidator(new Zend_Validate_StringLength(array('min' => 7, 'max' => 11)))->setDecorators($fieldDecorators);
     //email address
     $emailLabel = new Zend_Form_Element_Note('email_label');
     $emailLabel->setValue('Email address')->setDecorators($defaultDecorators);
     $this->addElement($emailLabel);
     //email address field
     $this->addElement('text', 'email_add');
     $this->getElement('email_add')->setRequired(true)->addFilter('StringTrim')->addValidator($emailValidator)->setDecorators($fieldDecorators);
     //login button
     $this->addElement('submit', 'save');
     $this->getElement('save')->setLabel('Save')->setDecorators($buttonDecorators);
     $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')), array(array('DivTag' => 'HtmlTag'), array('tag' => 'div', 'class' => 'loginDiv')), 'Form'));
 }