Merge branch 'w30_MDL-40796_m26_citycountry' of https://github.com/skodak/moodle
This commit is contained in:
@@ -1110,9 +1110,6 @@ while ($linenum <= $previewrows and $fields = $cir->next()) {
|
||||
|
||||
if (isset($rowcols['city'])) {
|
||||
$rowcols['city'] = trim($rowcols['city']);
|
||||
if (empty($rowcols['city'])) {
|
||||
$rowcols['status'][] = get_string('fieldrequired', 'error', 'city');
|
||||
}
|
||||
}
|
||||
// Check if rowcols have custom profile field with correct data and update error state.
|
||||
$noerror = uu_check_custom_profile_data($rowcols) && $noerror;
|
||||
|
||||
@@ -257,9 +257,10 @@ class admin_uploaduser_form2 extends moodleform {
|
||||
} else {
|
||||
$mform->setDefault('city', $CFG->defaultcity);
|
||||
}
|
||||
$mform->addRule('city', get_string('required'), 'required');
|
||||
|
||||
$mform->addElement('select', 'country', get_string('selectacountry'), get_string_manager()->get_list_of_countries());
|
||||
$choices = get_string_manager()->get_list_of_countries();
|
||||
$choices = array(''=>get_string('selectacountry').'...') + $choices;
|
||||
$mform->addElement('select', 'country', get_string('selectacountry'), $choices);
|
||||
if (empty($CFG->country)) {
|
||||
$mform->setDefault('country', $templateuser->country);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user