Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1342 ariadna 1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
/**
18
 *
19
 * @package   theme_universe
20
 * @copyright 2021 Marcin Czaja (https://rosea.io)
21
 * @license   Commercial https://themeforest.net/licenses
22
 *
23
 */
24
 
25
defined('MOODLE_INTERNAL') || die();
26
 
27
$page = new admin_settingpage('theme_universe_block2',
28
    get_string('settingsblock2', 'theme_universe'));
29
 
30
$name = 'theme_universe/displayblock2';
31
$title = get_string('turnon', 'theme_universe');
32
$description = get_string('displayblock2_desc', 'theme_universe');
33
$default = 0;
34
$setting = new admin_setting_configcheckbox($name, $title .
35
'<span class="badge badge-sq badge-dark ml-2">Block #2 (Hero Video)</span>', $description, $default);
36
$page->add($setting);
37
 
38
$name = 'theme_universe/block2fw';
39
$title = get_string('blockfw', 'theme_universe');
40
$description = get_string('blockfw_desc', 'theme_universe');
41
$default = 1;
42
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
43
$page->add($setting);
44
 
45
$name = 'theme_universe/block2id';
46
$title = get_string('additionalid', 'theme_universe');
47
$description = get_string('additionalid_desc', 'theme_universe');
48
$default = '';
49
$setting = new admin_setting_configtext($name, $title, $description, $default);
50
$page->add($setting);
51
 
52
$name = 'theme_universe/block2class';
53
$title = get_string('additionalclass', 'theme_universe');
54
$description = get_string('additionalclass_desc', 'theme_universe');
55
$default = '';
56
$setting = new admin_setting_configtext($name, $title, $description, $default);
57
$page->add($setting);
58
 
59
$name = 'theme_universe/block2wrapperalign';
60
$title = get_string('block2wrapperalign', 'theme_universe');
61
$description = get_string('block2wrapperalign_desc', 'theme_universe');
62
$default = 1;
63
$choices = array(0 => 'Left', 1 => 'Middle', 2 => 'Right');
64
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
65
$page->add($setting);
66
 
67
$name = 'theme_universe/showblock2wrapper';
68
$title = get_string('showblock2wrapper', 'theme_universe');
69
$description = get_string('showblock2wrapper_desc', 'theme_universe');
70
$default = 0;
71
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
72
$page->add($setting);
73
 
74
$name = 'theme_universe/block2wrapperbg';
75
$title = get_string('block2wrapperbg', 'theme_universe');
76
$description = get_string('block2wrapperbg_desc', 'theme_universe');
77
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
78
$setting->set_updatedcallback('theme_reset_all_caches');
79
$page->add($setting);
80
 
81
$name = 'theme_universe/block2introcontent';
82
$title = get_string('blockintrocontent', 'theme_universe');
83
$description = get_string('blockintrocontent_desc', 'theme_universe');
84
$default = '';
85
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
86
$page->add($setting);
87
 
88
$name = 'theme_universe/block2herosubtitle';
89
$title = get_string('blockintrosubtitle', 'theme_universe');
90
$description = get_string('blockintrosubtitle_desc', 'theme_universe');
91
$setting = new admin_setting_configtextarea($name, $title, $description, '', PARAM_TEXT);
92
$page->add($setting);
93
 
94
$name = 'theme_universe/block2herotitle';
95
$title = get_string('blockintrotitle', 'theme_universe');
96
$description = get_string('blockintrotitle_desc', 'theme_universe');
97
$setting = new admin_setting_configtextarea($name, $title, $description, '', PARAM_TEXT);
98
$page->add($setting);
99
 
100
$name = 'theme_universe/block2herotitlesize';
101
$title = get_string('blocktitlesize', 'theme_universe');
102
$description = get_string('blocktitlesize_desc', 'theme_universe');
103
$default = 1;
104
$choices = array(0 => 'Normal', 1 => 'Large', 2 => 'Extra Large');
105
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
106
$page->add($setting);
107
 
108
$name = 'theme_universe/block2herotitlecolor';
109
$title = get_string('blocktitlecolor', 'theme_universe');
110
$description = get_string('blocktitlecolor_desc', 'theme_universe');
111
$default = 1;
112
$choices = array(0 => 'White', 1 => 'Black', 2 => 'Gradient');
113
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
114
$page->add($setting);
115
 
116
$name = 'theme_universe/block2herotitleweight';
117
$title = get_string('blocktitleweight', 'theme_universe');
118
$description = get_string('blocktitleweight_desc', 'theme_universe');
119
$default = 1;
120
$choices = array(0 => 'Normal', 1 => 'Medium', 2 => 'Bold');
121
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
122
$page->add($setting);
123
 
124
$name = 'theme_universe/block2herocaption';
125
$title = get_string('block2herocaption', 'theme_universe');
126
$description = get_string('block2herocaption_desc', 'theme_universe');
127
$default = '';
128
$setting = new admin_setting_confightmleditor($name, $title, $description, $default);
129
$page->add($setting);
130
 
131
$name = 'theme_universe/block2htmlcontent';
132
$title = get_string('blockhtmlcontent', 'theme_universe');
133
$description = get_string('blockhtmlcontent_desc', 'theme_universe');
134
$default = '';
135
$setting = new universe_setting_confightmleditor($name, $title, $description, $default);
136
$page->add($setting);
137
 
138
$name = 'theme_universe/block2footercontent';
139
$title = get_string('blockfootercontent', 'theme_universe');
140
$description = get_string('blockfootercontent_desc', 'theme_universe');
141
$default = '';
142
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
143
$page->add($setting);
144
 
145
$name = 'theme_universe/block2videoposter';
146
$title = get_string('block2videoposter', 'theme_universe');
147
$description = get_string('block2videoposter_desc', 'theme_universe');
148
$opts = array('accepted_types' => array('.jpg, .png, .gif'), 'maxfiles' => 1);
149
$setting = new admin_setting_configstoredfile($name, $title, $description, 'block2videoposter', 0, $opts);
150
$page->add($setting);
151
 
152
$name = 'theme_universe/block2videomp4';
153
$title = get_string('block2videomp4', 'theme_universe');
154
$description = get_string('block2videomp4_desc', 'theme_universe');
155
$opts = array('accepted_types' => array('.mp4'), 'maxfiles' => 1);
156
$setting = new admin_setting_configstoredfile($name, $title, $description, 'block2videomp4', 0, $opts);
157
$page->add($setting);
158
 
159
$name = 'theme_universe/block2videowebm';
160
$title = get_string('block2videowebm', 'theme_universe');
161
$description = get_string('block2videowebm_desc', 'theme_universe');
162
$opts = array('accepted_types' => array('.webm'), 'maxfiles' => 1);
163
$setting = new admin_setting_configstoredfile($name, $title, $description, 'block2videowebm', 0, $opts);
164
$page->add($setting);
165
 
166
$settings->add($page);