This repository has been archived by the owner on Apr 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.php
126 lines (110 loc) · 5.35 KB
/
settings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* @package theme_nightingale
*/
defined('MOODLE_INTERNAL') || die();
if ($ADMIN->fulltree) {
$settings = new theme_nightingale_admin_settingspage_tabs('themesettingnightingale', get_string('configtitle', 'theme_nightingale'));
$page = new admin_settingpage('theme_nightingale_general', get_string('generalsettings', 'theme_nightingale'));
// Logo file setting.
$name = 'theme_nightingale/logo';
$title = get_string('logo','theme_nightingale');
$description = get_string('logodesc', 'theme_nightingale');
$setting = new admin_setting_configstoredfile($name, $title, $description, 'logo');
$setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting);
// Small logo file setting.
$name = 'theme_nightingale/smalllogo';
$title = get_string('smalllogo', 'theme_nightingale');
$description = get_string('smalllogodesc', 'theme_nightingale');
$setting = new admin_setting_configstoredfile($name, $title, $description, 'smalllogo');
$setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting);
// Sub logo file setting.
$name = 'theme_nightingale/sublogo';
$title = get_string('sublogo', 'theme_nightingale');
$description = get_string('sublogodesc', 'theme_nightingale');
$setting = new admin_setting_configstoredfile($name, $title, $description, 'sublogo');
$setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting);
// Show site name along with small logo.
$name = 'theme_nightingale/sitename';
$title = get_string('sitename', 'theme_nightingale');
$description = get_string('sitenamedesc', 'theme_nightingale');
$setting = new admin_setting_configcheckbox($name, $title, $description, 1);
$setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting);
// Main CSS
$name = 'theme_nightingale/maincss';
$title = get_string('maincss', 'theme_nightingale');
$description = get_string('maincssdesc', 'theme_nightingale');
$default = '';
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
$setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting);
// Footnote setting.
$name = 'theme_nightingale/footnote';
$title = get_string('footnote', 'theme_nightingale');
$description = get_string('footnotedesc', 'theme_nightingale');
$default = '';
$setting = new admin_setting_confightmleditor($name, $title, $description, $default);
$setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting);
// Partnership Info setting.
$name = 'theme_nightingale/partnershipinfo';
$title = get_string('partnershipinfo', 'theme_nightingale');
$description = get_string('partnershipinfodesc', 'theme_nightingale');
$default = '';
$setting = new admin_setting_confightmleditor($name, $title, $description, $default);
$setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting);
// Ribbons setting.
$name = 'theme_nightingale/ribbons';
$title = get_string('ribbons', 'theme_nightingale');
$description = get_string('ribbonsdesc', 'theme_nightingale');
$default = 'none';
$choices = array('none' => 'None', 'alpha' => 'Alpha', 'beta' => 'Beta');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting);
// Cookie Ribbon Setting
$name = 'theme_nightingale/cookieribbon';
$title = get_string('cookieribbon', 'theme_nightingale');
$description = get_string('cookieribbondesc', 'theme_nightingale');
$default = 'none';
$choices = array('yes' => 'Yes', 'no' => 'No');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
$setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting);
// Contact URL setting
$name = 'theme_nightingale/contacturl';
$title = get_string('contacturl', 'theme_nightingale');
$description = get_string('contacturldesc', 'theme_nightingale');
$default = '';
$setting = new admin_setting_configtext($name, $title, $description, $default);
$setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting);
// Cookie URL setting
$name = 'theme_nightingale/cookieurl';
$title = get_string('cookieurl', 'theme_nightingale');
$description = get_string('cookieurldesc', 'theme_nightingale');
$default = '';
$setting = new admin_setting_configtext($name, $title, $description, $default);
$setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting);
$settings->add($page);
}