2011-12-22 01:01:29 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
*/
|
|
|
|
class Application_Form_PasswordRestore extends Zend_Form
|
|
|
|
{
|
|
|
|
public function init()
|
|
|
|
{
|
2012-08-29 05:04:55 +02:00
|
|
|
$this->setDecorators(array(
|
|
|
|
array('ViewScript', array('viewScript' => 'form/password-restore.phtml'))
|
2012-04-17 18:16:10 +02:00
|
|
|
));
|
2012-07-11 00:55:44 +02:00
|
|
|
|
2011-12-22 01:01:29 +01:00
|
|
|
$this->addElement('text', 'email', array(
|
2015-07-22 19:48:47 +02:00
|
|
|
'label' => _('Email'),
|
2011-12-22 01:01:29 +01:00
|
|
|
'required' => true,
|
|
|
|
'filters' => array(
|
|
|
|
'stringTrim',
|
|
|
|
),
|
2012-04-17 18:16:10 +02:00
|
|
|
'decorators' => array(
|
|
|
|
'ViewHelper'
|
|
|
|
)
|
2011-12-22 01:01:29 +01:00
|
|
|
));
|
2012-08-29 05:04:55 +02:00
|
|
|
|
2012-08-24 18:40:30 +02:00
|
|
|
$this->addElement('text', 'username', array(
|
2012-11-15 16:59:06 +01:00
|
|
|
'label' => _('Username'),
|
2012-08-24 18:40:30 +02:00
|
|
|
'required' => false,
|
|
|
|
'filters' => array(
|
|
|
|
'stringTrim',
|
|
|
|
),
|
|
|
|
'decorators' => array(
|
|
|
|
'ViewHelper'
|
|
|
|
)
|
|
|
|
));
|
2011-12-22 01:01:29 +01:00
|
|
|
|
|
|
|
$this->addElement('submit', 'submit', array(
|
2012-11-15 16:59:06 +01:00
|
|
|
'label' => _('Restore 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',
|
|
|
|
'decorators' => array(
|
|
|
|
'ViewHelper'
|
|
|
|
)
|
2011-12-22 01:01:29 +01:00
|
|
|
));
|
2012-07-11 00:55:44 +02:00
|
|
|
|
2012-06-21 00:02:46 +02:00
|
|
|
$cancel = new Zend_Form_Element_Button("cancel");
|
|
|
|
$cancel->class = 'ui-button ui-widget ui-state-default ui-button-text-only center';
|
2015-07-22 19:48:47 +02:00
|
|
|
$cancel->setLabel(_("Return to login"))
|
2012-06-21 00:02:46 +02:00
|
|
|
->setIgnore(True)
|
|
|
|
->setAttrib('onclick', 'redirectToLogin();')
|
|
|
|
->setDecorators(array('ViewHelper'));
|
|
|
|
$this->addElement($cancel);
|
2011-12-22 01:01:29 +01:00
|
|
|
}
|
2012-08-29 05:04:55 +02:00
|
|
|
}
|