From: tjhunt Date: Tue, 25 Aug 2009 20:18:42 +0000 (+0000) Subject: forgot password form: MDL-19441 Make it clearer you should enter username or password. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d9d481aac7d7d19f9a691ab649edcda6b1d64f53;p=moodle.git forgot password form: MDL-19441 Make it clearer you should enter username or password. Credit to Olli as part of his GSOC project. --- diff --git a/lang/en_utf8/moodle.php b/lang/en_utf8/moodle.php index 8d37530273..e945d3ac5e 100644 --- a/lang/en_utf8/moodle.php +++ b/lang/en_utf8/moodle.php @@ -632,6 +632,8 @@ $string['enrolstartdate'] = 'Start date'; $string['entercourse'] = 'Click to enter this course'; $string['enteremailaddress'] = 'Enter in your email address to reset your password and have the new password sent to you via email.'; +$string['enteremail']='Enter your email address'; +$string['enterusername']='Enter your username'; $string['entries'] = 'Entries'; $string['error'] = 'Error'; $string['errortoomanylogins'] = 'Sorry, you have exceeded the allowed number of login attempts. Restart your browser.'; @@ -1217,7 +1219,7 @@ $string['passwordchanged'] = 'Password has been changed'; $string['passwordconfirmchange'] = 'Confirm password change'; $string['passwordextlink'] = 'The following link has been provided to recover your lost password. This will take you out of Moodle.'; $string['passwordforgotten'] = 'Forgotten password'; -$string['passwordforgotteninstructions'] = 'Your details must first be found in the user database. Please enter either your username or your registered email address in the appropriate box. There is no need to enter both.'; +$string['passwordforgotteninstructions'] = 'To reset your password, submit your username or your email address below. If we can find you in the database, an email will be sent to your email address, with instructions how to get access again.'; $string['passwordnohelp'] = 'No help is available to find your lost password. Please contact your Moodle administrator.'; $string['passwordrecovery'] = 'Yes, help me log in'; $string['passwordsdiffer'] = 'These passwords do not match'; @@ -1388,6 +1390,8 @@ $string['screenreaderyes'] = 'Yes'; $string['screenshot'] = 'Screenshot'; $string['search'] = 'Search'; $string['searchagain'] = 'Search again'; +$string['searchbyusername'] = 'Search by username'; +$string['searchbyemail'] = 'Search by email address'; $string['searchcourses'] = 'Search courses'; $string['searchhelp'] = 'You can search for multiple words at once.

word : find any match of this word within the text.
+word : only exact matching words will be found.
-word : don\'t include results containing this word.'; $string['searchoptions'] = 'Search options'; diff --git a/login/forgot_password_form.php b/login/forgot_password_form.php index 34bfe94f4c..1bc608c13f 100644 --- a/login/forgot_password_form.php +++ b/login/forgot_password_form.php @@ -8,15 +8,21 @@ class login_forgot_password_form extends moodleform { $mform =& $this->_form; $renderer =& $mform->defaultRenderer(); - $mform->addElement('header', '', get_string('passwordforgotten'), ''); + $mform->addElement('header', '', get_string('searchbyusername'), ''); $mform->addElement('text', 'username', get_string('username')); $mform->setType('username', PARAM_RAW); + $submitlabel = get_string('search'); + $mform->addElement('submit', 'submitbutton', $submitlabel); + + $mform->addElement('header', '', get_string('searchbyemail'), ''); + $mform->addElement('text', 'email', get_string('email')); $mform->setType('email', PARAM_RAW); - $this->add_action_buttons(true, get_string('ok')); + $submitlabel = get_string('search'); + $mform->addElement('submit', 'submitbutton', $submitlabel); } function validation($data, $files) {