Merge branch 'w30_MDL-40796_m26_citycountry' of https://github.com/skodak/moodle

This commit is contained in:
Eloy Lafuente (stronk7)
2013-07-23 20:29:43 +02:00
2 changed files with 3 additions and 5 deletions
-3
View File
@@ -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;
+3 -2
View File
@@ -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 {