MDL-24355 Fixed up deletion of tag correlations when deleting tags
[moodle.git] / admin / uploadpicture_form.php
blob5c4a1e9e81f2ff6b28727f54863b195f497d83b6
1 <?php // $Id$
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 (){
11 global $CFG, $USER;
13 $mform =& $this->_form;
15 $this->set_upload_manager(new upload_manager('userpicturesfile', false, false, null, false, 0, true, true, false));
17 $mform->addElement('header', 'settingsheader', get_string('upload'));
19 $mform->addElement('file', 'userpicturesfile', get_string('file'), 'size="40"');
20 $mform->addRule('userpicturesfile', null, 'required');
22 $choices =& $this->_customdata;
23 $mform->addElement('select', 'userfield', get_string('uploadpicture_userfield', 'admin'), $choices);
24 $mform->setType('userfield', PARAM_INT);
26 $choices = array( 0 => get_string('no'), 1 => get_string('yes') );
27 $mform->addElement('select', 'overwritepicture', get_string('uploadpicture_overwrite', 'admin'), $choices);
28 $mform->setType('overwritepicture', PARAM_INT);
30 $this->add_action_buttons(false, get_string('uploadpictures', 'admin'));