Fixes MDL-11648, "Required" is inappropriate text for legend in user profile edit form. Merged.

This commit is contained in:
nfreear
2007-10-08 13:58:24 +00:00
parent 5a1920568c
commit a11b2d8e72
3 changed files with 7 additions and 2 deletions
+1
View File
@@ -644,6 +644,7 @@ $string['gd1'] = 'GD 1.x is installed';
$string['gd2'] = 'GD 2.x is installed';
$string['gdneed'] = 'GD must be installed to see this graph';
$string['gdnot'] = 'GD is not installed';
$string['general'] = 'General';
$string['gettheselogs'] = 'Get these logs';
$string['go'] = 'Go';
$string['gpl'] = 'Copyright (C) 1999 onwards Martin Dougiamas (http://moodle.com)
+3 -1
View File
@@ -10,6 +10,8 @@ class user_edit_form extends moodleform {
$mform =& $this->_form;
$this->set_upload_manager(new upload_manager('imagefile', false, false, null, false, 0, true, true, false));
//Accessibility: "Required" is bad legend text.
$strgeneral = get_string('general');
$strrequired = get_string('required');
/// Add some extra hidden fields
@@ -17,7 +19,7 @@ class user_edit_form extends moodleform {
$mform->addElement('hidden', 'course', $COURSE->id);
/// Print the required moodle fields first
$mform->addElement('header', 'moodle', $strrequired);
$mform->addElement('header', 'moodle', $strgeneral);
/// shared fields
useredit_shared_definition($mform);
+3 -1
View File
@@ -10,6 +10,8 @@ class user_editadvanced_form extends moodleform {
$mform =& $this->_form;
$this->set_upload_manager(new upload_manager('imagefile', false, false, null, false, 0, true, true, false));
//Accessibility: "Required" is bad legend text.
$strgeneral = get_string('general');
$strrequired = get_string('required');
/// Add some extra hidden fields
@@ -17,7 +19,7 @@ class user_editadvanced_form extends moodleform {
$mform->addElement('hidden', 'course', $COURSE->id);
/// Print the required moodle fields first
$mform->addElement('header', 'moodle', $strrequired);
$mform->addElement('header', 'moodle', $strgeneral);
$mform->addElement('text', 'username', get_string('username'), 'size="20"');
$mform->addRule('username', $strrequired, 'required', null, 'client');