MDL-25778 add defaultcity option

This is based on patch by Jonathan Harker.
This commit is contained in:
Petr Skoda
2011-02-14 20:10:50 +01:00
parent d911c72bf9
commit fa7f750c60
7 changed files with 25 additions and 1 deletions
+3 -1
View File
@@ -194,7 +194,9 @@ function useredit_shared_definition(&$mform, $editoroptions = null) {
$mform->addElement('text', 'city', get_string('city'), 'maxlength="120" size="21"');
$mform->setType('city', PARAM_MULTILANG);
$mform->addRule('city', $strrequired, 'required', null, 'client');
if (!empty($CFG->defaultcity)) {
$mform->setDefault('city', $CFG->defaultcity);
}
$choices = get_string_manager()->get_list_of_countries();
$choices= array(''=>get_string('selectacountry').'...') + $choices;