Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / admin / uploadpicture_form.php
blob542477cc0edc86fbb042080bb436407835a0fc5b
1 <?php // $Id$
2 require_once $CFG->libdir.'/formslib.php';
4 class admin_uploadpicture_form extends moodleform {
5 function definition (){
6 global $CFG, $USER;
7 global $userfields;
9 $mform =& $this->_form;
11 $this->set_upload_manager(new upload_manager('userpicturesfile', false, false, null, false, 0, true, true, false));
13 $mform->addElement('header', 'settingsheader', get_string('upload'));
15 $mform->addElement('file', 'userpicturesfile', get_string('file'), 'size="40"');
16 $mform->addRule('userpicturesfile', null, 'required');
18 $choices = $userfields;
19 $mform->addElement('select', 'userfield', get_string('uploadpicture_userfield', 'admin'), $choices);
20 $mform->setType('userfield', PARAM_INT);
22 $choices = array( 0 => get_string('no'), 1 => get_string('yes') );
23 $mform->addElement('select', 'overwritepicture', get_string('uploadpicture_overwrite', 'admin'), $choices);
24 $mform->setType('overwritepicture', PARAM_INT);
26 $this->add_action_buttons(false, get_string('uploadpictures', 'admin'));