2011-12-22 01:01:29 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class Application_Form_PasswordRestore extends Zend_Form
|
|
|
|
{
|
|
|
|
public function init()
|
|
|
|
{
|
2021-10-11 16:10:47 +02:00
|
|
|
$this->setDecorators([
|
|
|
|
['ViewScript', ['viewScript' => 'form/password-restore.phtml']],
|
|
|
|
]);
|
2012-07-11 00:55:44 +02:00
|
|
|
|
2021-10-11 16:10:47 +02:00
|
|
|
$this->addElement('text', 'email', [
|
2015-07-22 19:48:47 +02:00
|
|
|
'label' => _('Email'),
|
2011-12-22 01:01:29 +01:00
|
|
|
'required' => true,
|
2021-10-11 16:10:47 +02:00
|
|
|
'filters' => [
|
2011-12-22 01:01:29 +01:00
|
|
|
'stringTrim',
|
2021-10-11 16:10:47 +02:00
|
|
|
],
|
|
|
|
'decorators' => [
|
|
|
|
'ViewHelper',
|
|
|
|
],
|
|
|
|
]);
|
2012-08-29 05:04:55 +02:00
|
|
|
|
2021-10-11 16:10:47 +02:00
|
|
|
$this->addElement('text', 'username', [
|
2012-11-15 16:59:06 +01:00
|
|
|
'label' => _('Username'),
|
2012-08-24 18:40:30 +02:00
|
|
|
'required' => false,
|
2021-10-11 16:10:47 +02:00
|
|
|
'filters' => [
|
2012-08-24 18:40:30 +02:00
|
|
|
'stringTrim',
|
2021-10-11 16:10:47 +02:00
|
|
|
],
|
|
|
|
'decorators' => [
|
|
|
|
'ViewHelper',
|
|
|
|
],
|
|
|
|
]);
|
2011-12-22 01:01:29 +01:00
|
|
|
|
2021-10-11 16:10:47 +02:00
|
|
|
$this->addElement('submit', 'submit', [
|
2015-08-07 19:57:42 +02:00
|
|
|
'label' => _('Reset password'),
|
2011-12-22 01:01:29 +01:00
|
|
|
'ignore' => true,
|
2012-04-17 18:16:10 +02:00
|
|
|
'class' => 'ui-button ui-widget ui-state-default ui-button-text-only center',
|
2021-10-11 16:10:47 +02:00
|
|
|
'decorators' => [
|
|
|
|
'ViewHelper',
|
|
|
|
],
|
|
|
|
]);
|
2012-07-11 00:55:44 +02:00
|
|
|
|
2021-10-11 16:10:47 +02:00
|
|
|
$cancel = new Zend_Form_Element_Button('cancel');
|
2012-06-21 00:02:46 +02:00
|
|
|
$cancel->class = 'ui-button ui-widget ui-state-default ui-button-text-only center';
|
2021-10-11 16:10:47 +02:00
|
|
|
$cancel->setLabel(_('Back'))
|
|
|
|
->setIgnore(true)
|
|
|
|
->setAttrib('onclick', 'window.location = ' . Zend_Controller_Front::getInstance()->getBaseUrl('login'))
|
2022-01-23 19:15:55 +01:00
|
|
|
->setDecorators(['ViewHelper']);
|
2012-06-21 00:02:46 +02:00
|
|
|
$this->addElement($cancel);
|
2011-12-22 01:01:29 +01:00
|
|
|
}
|
2012-08-29 05:04:55 +02:00
|
|
|
}
|