Skip to content

Commit

Permalink
made some changes to user/edit.php setAdvanced and header name change…
Browse files Browse the repository at this point in the history
…s for MDL-7780
  • Loading branch information
jamiesensei committed Jan 19, 2007
1 parent ec3dac9 commit c0ae32d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions user/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ function definition () {
$choices["1"] = get_string("htmlformat");
$mform->addElement('select', 'mailformat', get_string('emailformat'), $choices);
$mform->setType('mailformat', PARAM_INT);
$mform->setAdvanced('mailformat');

if (!empty($CFG->unicodedb) && !empty($CFG->allowusermailcharset)) {
$mailcharset = get_user_preferences('mailcharset', '0', $user->id);
Expand All @@ -124,22 +125,26 @@ function definition () {
$mform->addElement('select', 'mailcharset', get_string('emailcharset'), $choices);
$mform->setType('mailcharset', PARAM_CLEAN);
$mform->setDefault('mailcharset', $mailcharset);
$mform->setAdvanced('mailcharset');
}


$choices = array();
$choices['0'] = get_string('emaildigestoff');
$choices['1'] = get_string('emaildigestcomplete');
$choices['2'] = get_string('emaildigestsubjects');
$mform->addElement('select', 'maildigest', get_string('emaildigest'), $choices);
$mform->setType('maildigest', PARAM_INT);
$mform->setDefault('maildigest', 0);
$mform->setAdvanced('maildigest');

$choices = array();
$choices["1"] = get_string("autosubscribeyes");
$choices["0"] = get_string("autosubscribeno");
$mform->addElement('select', 'autosubscribe', get_string('autosubscribe'), $choices);
$mform->setType('autosubscribe', PARAM_INT);
$mform->setDefault('autosubscribe', 0);
$mform->setAdvanced('autosubscribe');

if (!empty($CFG->forum_trackreadposts)) {
$choices = array();
Expand All @@ -149,6 +154,7 @@ function definition () {
$mform->setType('trackforums', PARAM_INT);
$mform->setDefault('trackforums', 0);
}
$mform->setAdvanced('trackforums');

if ($CFG->htmleditor) {
$choices = array();
Expand All @@ -158,6 +164,7 @@ function definition () {
$mform->setType('htmleditor', PARAM_INT);
$mform->setDefault('htmleditor', 1);
}
$mform->setAdvanced('htmleditor');

$choices = array();
$choices["0"] = get_string("ajaxno");
Expand All @@ -168,14 +175,15 @@ function definition () {
if (empty($CFG->enableajax)) {
$mform->hardFreeze('ajax');
}
$mform->setAdvanced('ajax');

$mform->addElement('text', 'city', get_string('city'), 'maxlength="100" size="25"');
$mform->setType('city', PARAM_MULTILANG);
$mform->addRule('city', $strrequired, 'required', null, 'client');


$choices = get_list_of_countries();
$choices[0] = get_string('selectacountry').'...';
$choices[0] = get_string('selectacountry').'...';
$mform->addElement('select', 'country', get_string('selectacountry'), $choices);
$mform->setType('country', PARAM_ALPHA);
$mform->addRule('country', $strrequired, 'required', null, 'client');
Expand Down Expand Up @@ -206,6 +214,7 @@ function definition () {
$choices += get_list_of_themes();
$mform->addElement('select', 'theme', get_string('preferredtheme'), $choices);
$mform->setType('theme', PARAM_ALPHANUM);
$mform->setAdvanced('theme');
}

$mform->addElement('htmleditor', 'description', get_string('userdescription'));
Expand All @@ -221,6 +230,7 @@ function definition () {
$mform->addElement('select', 'screenreader', get_string('screenreaderuse'), $choices);
$mform->setType('screenreader', PARAM_INT);
$mform->setDefault('screenreader', 0);
$mform->setAdvanced('screenreader');

$maxbytes = get_max_upload_file_size($CFG->maxbytes, $course->maxbytes);
if (!empty($CFG->gdversion) and $maxbytes and (empty($CFG->disableuserimages) or $userupdate)) {
Expand All @@ -246,7 +256,8 @@ function definition () {


/// Moodle optional fields
$mform->addElement('header', 'moodle_optional', get_string('followingoptional'));
$mform->addElement('header', 'moodle_optional', get_string('optional', 'form'));
$mform->setAdvanced('moodle_optional');

$mform->addElement('text', 'url', get_string('webpage'), 'maxlength="255" size="50"');
$mform->setType('url', PARAM_URL);
Expand Down

0 comments on commit c0ae32d

Please sign in to comment.