MDL-28558 Administration: Made Country and City user profile fields optional

This commit is contained in:
Rajesh Taneja
2013-05-17 09:39:26 +08:00
parent e2637d1da3
commit 69ff684cdb
-2
View File
@@ -219,7 +219,6 @@ function useredit_shared_definition(&$mform, $editoroptions = null, $filemanager
$mform->addElement('text', 'city', get_string('city'), 'maxlength="120" size="21"');
$mform->setType('city', PARAM_TEXT);
$mform->addRule('city', $strrequired, 'required', null, 'client');
if (!empty($CFG->defaultcity)) {
$mform->setDefault('city', $CFG->defaultcity);
}
@@ -227,7 +226,6 @@ function useredit_shared_definition(&$mform, $editoroptions = null, $filemanager
$choices = get_string_manager()->get_list_of_countries();
$choices= array(''=>get_string('selectacountry').'...') + $choices;
$mform->addElement('select', 'country', get_string('selectacountry'), $choices);
$mform->addRule('country', $strrequired, 'required', null, 'client');
if (!empty($CFG->country)) {
$mform->setDefault('country', $CFG->country);
}