CC-3110 : Password reset
basic functionality password reset using sendmail
This commit is contained in:
parent
ac50c279f7
commit
52b0e3c5f9
26 changed files with 3024 additions and 23 deletions
35
airtime_mvc/application/forms/PasswordChange.php
Normal file
35
airtime_mvc/application/forms/PasswordChange.php
Normal file
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
*/
|
||||
class Application_Form_PasswordChange extends Zend_Form
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
$this->addElement('password', 'password', array(
|
||||
'label' => 'Password',
|
||||
'required' => true,
|
||||
'filters' => array('stringTrim'),
|
||||
'validators' => array(
|
||||
array('stringLength', false, array(6, 80)),
|
||||
),
|
||||
));
|
||||
|
||||
$this->addElement('password', 'password_confirm', array(
|
||||
'label' => 'Password Confirmation',
|
||||
'required' => true,
|
||||
'filters' => array('stringTrim'),
|
||||
'validators' => array(
|
||||
new Zend_Validate_Callback(function ($value, $context) {
|
||||
return $value == $context['password'];
|
||||
}),
|
||||
),
|
||||
'errorMessages' => array("Password confirmation does not match your password."),
|
||||
));
|
||||
|
||||
$this->addElement('submit', 'submit', array(
|
||||
'label' => 'Set password',
|
||||
'ignore' => true,
|
||||
));
|
||||
}
|
||||
}
|
23
airtime_mvc/application/forms/PasswordRestore.php
Normal file
23
airtime_mvc/application/forms/PasswordRestore.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
*/
|
||||
class Application_Form_PasswordRestore extends Zend_Form
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
$this->addElement('text', 'email', array(
|
||||
'label' => 'E-mail',
|
||||
'required' => true,
|
||||
'filters' => array(
|
||||
'stringTrim',
|
||||
),
|
||||
));
|
||||
|
||||
$this->addElement('submit', 'submit', array(
|
||||
'label' => 'Restore password',
|
||||
'ignore' => true,
|
||||
'class' => 'ui-button ui-state-default'
|
||||
));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue