Commit | Line | Data |
---|---|---|
c84cea17 DC |
1 | <?php |
2 | ||
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. | |
14 | // | |
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/>. | |
17 | ||
18 | /** | |
64f93798 | 19 | * A moodle form to manage folder files |
c84cea17 | 20 | * |
9fe1fbcc PS |
21 | * @package mod |
22 | * @subpackage folder | |
23 | * @copyright 2010 Dongsheng Cai <dongsheng@moodle.com> | |
24 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | |
c84cea17 DC |
25 | */ |
26 | ||
64f93798 PS |
27 | defined('MOODLE_INTERNAL') || die(); |
28 | ||
29 | require_once("$CFG->libdir/formslib.php"); | |
30 | ||
c84cea17 DC |
31 | class mod_folder_edit_form extends moodleform { |
32 | function definition() { | |
64f93798 PS |
33 | $mform = $this->_form; |
34 | ||
35 | $data = $this->_customdata['data']; | |
36 | $options = $this->_customdata['options']; | |
37 | ||
38 | $mform->addElement('hidden', 'id', $data->id); | |
39 | $mform->addElement('filemanager', 'files_filemanager', get_string('files'), null, $options); | |
50fb4c8f | 40 | $submit_string = get_string('savechanges'); |
e30cffa2 | 41 | $this->add_action_buttons(true, $submit_string); |
64f93798 PS |
42 | |
43 | $this->set_data($data); | |
c84cea17 DC |
44 | } |
45 | } |