From 8874895892b770ef717493fe3d683a4a883019f1 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Mon, 22 Jul 2013 17:42:42 +0800 Subject: [PATCH] MDL-40816 backup: added missing setType calls to the manage backups form --- backup/backupfilesedit_form.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/backup/backupfilesedit_form.php b/backup/backupfilesedit_form.php index 36a4030da07..5b40ea50fb9 100644 --- a/backup/backupfilesedit_form.php +++ b/backup/backupfilesedit_form.php @@ -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']); }