Continuing work on boxxie theme
[moodle.git] / blocks / settings_navigation_tree / edit_form.php
CommitLineData
7d2a0492 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/**
19 * Form for editing settings navigation instances.
20 *
21 * @since 2.0
22 * @package blocks
23 * @copyright 2009 Sam Hemelryk
24 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25 */
26
27/**
28 * Form for setting navigation instances.
29 *
30 * @package blocks
31 * @copyright 2009 Sam Hemelryk
32 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
33 */
34class block_settings_navigation_tree_edit_form extends block_edit_form {
35 protected function specific_definition($mform) {
36 $mform->addElement('header', 'configheader', get_string('blocksettings', 'block'));
37
38 $yesnooptions = array('yes'=>get_string('yes'), 'no'=>get_string('no'));
39
40 $mform->addElement('select', 'config_enablehoverexpansion', get_string('enablehoverexpansion', $this->block->blockname), $yesnooptions);
41 if (empty($this->block->config->enablehoverexpansion) || $this->block->config->enablehoverexpansion=='no') {
42 $mform->getElement('config_enablehoverexpansion')->setSelected('no');
43 } else {
44 $mform->getElement('config_enablehoverexpansion')->setSelected('yes');
45 }
46
47 $mform->addElement('select', 'config_enablesidebarpopout', get_string('enablesidebarpopout', $this->block->blockname), $yesnooptions);
48 if (empty($this->block->config->enablesidebarpopout) || $this->block->config->enablesidebarpopout=='no') {
49 $mform->getElement('config_enablesidebarpopout')->setSelected('no');
50 } else {
51 $mform->getElement('config_enablesidebarpopout')->setSelected('yes');
52 }
53 }
54}