blob: 7bb39d454c57417575a7508a6ef10b8cbbf445ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<?php
/**
* Piwik - Open source web analytics
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
* @version $Id$
*
* @category Piwik_Plugins
* @package Piwik_Login
*/
/**
*
* @package Piwik_Login
*/
class Piwik_Login_PasswordForm extends Piwik_Form
{
function __construct()
{
parent::__construct();
// reset
$this->updateAttributes('id="lostpasswordform" name="lostpasswordform"');
}
function init()
{
$currentUrl = 'index.php';
$urlToGoAfter = Piwik_Common::getRequestVar('form_url', $currentUrl, 'string');
$formElements = array(
array('text', 'form_login'),
array('hidden', 'form_url', $urlToGoAfter),
);
$this->addElements( $formElements );
$formRules = array(
array('form_login', sprintf(Piwik_Translate('General_Required'), Piwik_Translate('Login_LoginOrEmail')), 'required'),
);
$this->addRules( $formRules );
$this->addElement('submit', 'submit');
}
}
|