* @package tao */ class tao_actions_form_PasswordRecovery extends tao_helpers_form_FormContainer { /** * Initialize password recovery form * * @access public * @author Aleh Hutnikau */ public function initForm() { $this->form = tao_helpers_form_FormFactory::getForm('passwordRecoveryForm'); $connectElt = tao_helpers_form_FormFactory::getElement('recovery', 'Submit'); $connectElt->setValue(__('Email')); $connectElt->setAttribute('class', 'btn-success small'); $this->form->setActions([$connectElt], 'bottom'); } /** * Initialiaze recovery form elements * * @access public * @author Aleh Hutnikau */ public function initElements() { $mailElement = tao_helpers_form_FormFactory::getElement('userMail', 'Textbox'); $mailElement->setDescription(__('Your mail') . '*'); $mailElement->addValidator(tao_helpers_form_FormFactory::getValidator('NotEmpty')); $mailElement->addValidator(tao_helpers_form_FormFactory::getValidator('Email')); $mailElement->setAttributes(['autofocus' => 'autofocus']); $this->form->addElement($mailElement); } }