]> git.mjollnir.org Git - moodle.git/commitdiff
forgot password form: MDL-19441 Make it clearer you should enter username or password.
authortjhunt <tjhunt>
Tue, 25 Aug 2009 20:18:42 +0000 (20:18 +0000)
committertjhunt <tjhunt>
Tue, 25 Aug 2009 20:18:42 +0000 (20:18 +0000)
Credit to Olli as part of his GSOC project.

lang/en_utf8/moodle.php
login/forgot_password_form.php

index 8d375302730ec1714cd5dd41284d6947eebd6810..e945d3ac5ee75541149757862a408c6d79333092 100644 (file)
@@ -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 <strong>either</strong> 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.<br /><br />word : find any match of this word within the text.<br />+word : only exact matching words will be found.<br />-word : don\'t include results containing this word.';
 $string['searchoptions'] = 'Search options';
index 34bfe94f4cc1a5409250bb41300503f10a365ff9..1bc608c13f4ec89a2456fc8322ff083647fac204 100644 (file)
@@ -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) {