Merge branch 'MDL-30966-print-object_21_STABLE' of git://github.com/mudrd8mz/moodle...
[moodle.git] / backup / backupfilesedit_form.php
blob7906a080d1a6ea853314820fa80c74c910c311fd
1 <?php
3 // This file is part of Moodle - http://moodle.org/
4 //
5 // Moodle is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // Moodle is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 /**
19 * Manage backup files
20 * @package moodlecore
21 * @copyright 2010 Dongsheng Cai <dongsheng@moodle.com>
22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24 require_once($CFG->libdir.'/formslib.php');
26 class backup_files_edit_form extends moodleform {
27 function definition() {
28 $mform =& $this->_form;
29 $contextid = $this->_customdata['contextid'];
30 $options = array('subdirs'=>0, 'maxfiles'=>-1, 'accepted_types'=>'*', 'return_types'=>FILE_INTERNAL);
31 $mform->addElement('filemanager', 'files_filemanager', get_string('files'), null, $options);
32 $mform->addElement('hidden', 'contextid', $this->_customdata['contextid']);
33 $mform->addElement('hidden', 'currentcontext', $this->_customdata['currentcontext']);
34 $mform->addElement('hidden', 'filearea', $this->_customdata['filearea']);
35 $mform->addElement('hidden', 'component', $this->_customdata['component']);
36 $mform->addElement('hidden', 'returnurl', $this->_customdata['returnurl']);
37 $this->add_action_buttons(true, get_string('savechanges'));
38 $this->set_data($this->_customdata['data']);