2 require_once $CFG->libdir
.'/formslib.php';
4 class admin_uploadpicture_form
extends moodleform
{
5 function definition (){
8 $mform =& $this->_form
;
10 $this->set_upload_manager(new upload_manager('userpicturesfile', false, false, null, false, 0, true, true, false));
12 $mform->addElement('header', 'settingsheader', get_string('upload'));
14 $mform->addElement('file', 'userpicturesfile', get_string('file'), 'size="40"');
15 $mform->addRule('userpicturesfile', null, 'required');
17 $choices =& $this->_customdata
;
18 $mform->addElement('select', 'userfield', get_string('uploadpicture_userfield', 'admin'), $choices);
19 $mform->setType('userfield', PARAM_INT
);
21 $choices = array( 0 => get_string('no'), 1 => get_string('yes') );
22 $mform->addElement('select', 'overwritepicture', get_string('uploadpicture_overwrite', 'admin'), $choices);
23 $mform->setType('overwritepicture', PARAM_INT
);
25 $this->add_action_buttons(false, get_string('uploadpictures', 'admin'));