diff options
Diffstat (limited to 'plugins/Login/ResetPasswordForm.php')
-rw-r--r-- | plugins/Login/ResetPasswordForm.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/Login/ResetPasswordForm.php b/plugins/Login/ResetPasswordForm.php index 87470f6e18..a62cf775d1 100644 --- a/plugins/Login/ResetPasswordForm.php +++ b/plugins/Login/ResetPasswordForm.php @@ -25,6 +25,9 @@ class Piwik_Login_ResetPasswordForm extends Piwik_Form function init() { + $currentUrl = 'index.php'; + $urlToGoAfter = Piwik_Common::getRequestVar('form_url', $currentUrl, 'string'); + $resetToken = Piwik_Common::getRequestVar('token', '', 'string'); $formElements = array( @@ -32,6 +35,7 @@ class Piwik_Login_ResetPasswordForm extends Piwik_Form array('password', 'form_password'), array('password', 'form_password_bis'), array('text', 'form_token'), + array('hidden', 'form_url', $urlToGoAfter), ); $this->addElements( $formElements ); @@ -41,7 +45,7 @@ class Piwik_Login_ResetPasswordForm extends Piwik_Form $this->setDefaults($defaults); $formRules = array( - array('form_login', sprintf(Piwik_Translate('General_Required'), Piwik_Translate('General_Username')), 'required'), + array('form_login', sprintf(Piwik_Translate('General_Required'), Piwik_Translate('Login_Login')), 'required'), array('form_password', sprintf(Piwik_Translate('General_Required'), Piwik_Translate('Login_Password')), 'required'), array('form_password_bis', sprintf(Piwik_Translate('General_Required'), Piwik_Translate('Login_PasswordRepeat')), 'required'), array('form_token', sprintf(Piwik_Translate('General_Required'), Piwik_Translate('Login_PasswordResetToken')), 'required'), |