3 if (!defined('MOODLE_INTERNAL')) {
4 die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
7 require_once $CFG->libdir
.'/formslib.php';
9 class admin_uploadpicture_form
extends moodleform
{
10 function definition (){
13 $mform =& $this->_form
;
15 $mform->addElement('header', 'settingsheader', get_string('upload'));
19 $options['accepted_types'] = array('archive');
20 $mform->addElement('filepicker', 'userpicturesfile', get_string('file'), 'size="40"', $options);
21 $mform->addRule('userpicturesfile', null, 'required');
23 $choices =& $this->_customdata
;
24 $mform->addElement('select', 'userfield', get_string('uploadpicture_userfield', 'admin'), $choices);
25 $mform->setType('userfield', PARAM_INT
);
27 $choices = array( 0 => get_string('no'), 1 => get_string('yes') );
28 $mform->addElement('select', 'overwritepicture', get_string('uploadpicture_overwrite', 'admin'), $choices);
29 $mform->setType('overwritepicture', PARAM_INT
);
31 $this->add_action_buttons(false, get_string('uploadpictures', 'admin'));