From 1c54b2bb31e35cf7a688ecc00ef98158fc0b7138 Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 16 Sep 2007 09:39:03 +0000 Subject: [PATCH] improved accessibility of user edit page - adding help icons, removing incorrect static help from interest, improving interests strings --- lang/en_utf8/moodle.php | 3 ++- user/editadvanced_form.php | 6 ++++-- user/editlib.php | 5 +++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lang/en_utf8/moodle.php b/lang/en_utf8/moodle.php index 97dd129aa9..735d8d82e3 100644 --- a/lang/en_utf8/moodle.php +++ b/lang/en_utf8/moodle.php @@ -559,7 +559,6 @@ $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['enteryourinterests'] = 'Enter your interests separated by commas'; $string['entries'] = 'Entries'; $string['error'] = 'Error'; $string['errortoomanylogins'] = 'Sorry, you have exceeded the allowed number of login attempts. Restart your browser.'; @@ -720,6 +719,7 @@ $string['healthsolution'] = 'Solution'; $string['help'] = 'Help'; $string['helpemoticons'] = 'Use emoticons'; $string['helpformatting'] = 'About formatting text'; +$string['helpinterestslist'] = 'Enter your interests separated by commas'; $string['helphtml'] = 'How to write html'; $string['helpindex'] = 'Index of all help files'; $string['helppicture'] = 'How to upload a picture'; @@ -785,6 +785,7 @@ $string['info'] = 'Information'; $string['institution'] = 'Institution'; $string['instudentview'] = 'in student view'; $string['interests'] = 'Interests'; +$string['interestslist'] = 'List of interests'; $string['invalidemail'] = 'Invalid email address'; $string['invalidlogin'] = 'Invalid login, please try again'; $string['ip_address'] = 'IP Address'; diff --git a/user/editadvanced_form.php b/user/editadvanced_form.php index 0deb34a413..1bcd86a42a 100644 --- a/user/editadvanced_form.php +++ b/user/editadvanced_form.php @@ -33,11 +33,13 @@ class user_editadvanced_form extends moodleform { $mform->setAdvanced('auth'); $mform->addElement('passwordunmask', 'newpassword', get_string('newpassword'), 'size="20"'); + $mform->setHelpButton('newpassword', array(false, get_string('leavetokeep'), + false, true, false, get_string('leavetokeep'))); $mform->setType('newpassword', PARAM_RAW); - //TODO: add missing help - empty means no change $mform->addElement('advcheckbox', 'preference_auth_forcepasswordchange', get_string('forcepasswordchange')); - //TODO: add missing help - user will be forced to change password + $mform->setHelpButton('preference_auth_forcepasswordchange', array(false, get_string('forcepasswordchangehelp'), + false, true, false, get_string('forcepasswordchangehelp'))); /// shared fields useredit_shared_definition($mform); diff --git a/user/editlib.php b/user/editlib.php index 66e5f011bf..df0019b8af 100644 --- a/user/editlib.php +++ b/user/editlib.php @@ -223,8 +223,9 @@ function useredit_shared_definition(&$mform) { if( !empty($CFG->usetags)) { $mform->addElement('header', 'moodle_interests', get_string('interests')); - $mform->addElement('static', 'helptextinterests', '' , get_string('enteryourinterests')); - $mform->addElement('textarea', 'interests', get_string('interests'), 'cols="45" rows="3"'); + $mform->addElement('textarea', 'interests', get_string('interestslist'), 'cols="45" rows="3"'); + $mform->setHelpButton('interests', array(false, get_string('helpinterestslist'), + false, true, false, get_string('helpinterestslist'))); } /// Moodle optional fields -- 2.39.5