MDL-40816 backup: added missing setType calls to the manage backups form

This commit is contained in:
Mark Nelson 2013-07-22 17:42:42 +08:00
parent ffc3f5308b
commit 8874895892

View File

@ -28,12 +28,24 @@ class backup_files_edit_form extends moodleform {
$mform =& $this->_form;
$contextid = $this->_customdata['contextid'];
$options = array('subdirs'=>0, 'maxfiles'=>-1, 'accepted_types'=>'*', 'return_types'=>FILE_INTERNAL | FILE_REFERENCE);
$mform->addElement('filemanager', 'files_filemanager', get_string('files'), null, $options);
$mform->addElement('hidden', 'contextid', $this->_customdata['contextid']);
$mform->setType('contextid', PARAM_INT);
$mform->addElement('hidden', 'currentcontext', $this->_customdata['currentcontext']);
$mform->setType('currentcontext', PARAM_INT);
$mform->addElement('hidden', 'filearea', $this->_customdata['filearea']);
$mform->setType('filearea', PARAM_AREA);
$mform->addElement('hidden', 'component', $this->_customdata['component']);
$mform->setType('component', PARAM_COMPONENT);
$mform->addElement('hidden', 'returnurl', $this->_customdata['returnurl']);
$mform->setType('returnurl', PARAM_URL);
$this->add_action_buttons(true, get_string('savechanges'));
$this->set_data($this->_customdata['data']);
}