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
 
26
defined('MOODLE_INTERNAL') || die();
27
 
28
$page = new admin_settingpage('theme_universe_block3', get_string('settingsblock3', 'theme_universe'));
29
 
30
$name = 'theme_universe/displayblock3';
31
$title = get_string('turnon', 'theme_universe');
32
$description = get_string('displayblock3_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 #3 (Hero Image)</span>', $description, $default);
36
$page->add($setting);
37
 
38
$name = 'theme_universe/block3fw';
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/block3id';
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/block3class';
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/block3wrapperalign';
60
$title = get_string('block3wrapperalign', 'theme_universe');
61
$description = get_string('block3wrapperalign_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/showblock3wrapper';
68
$title = get_string('showblock3wrapper', 'theme_universe');
69
$description = get_string('showblock3wrapper_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/block3wrapperbg';
75
$title = get_string('block3wrapperbg', 'theme_universe');
76
$description = get_string('block3wrapperbg_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/block3introcontent';
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/block3herosubtitle';
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/block3herotitle';
95
$title = get_string('block3herotitle', 'theme_universe');
96
$description = get_string('block3herotitle_desc', 'theme_universe');
97
$setting = new admin_setting_configtextarea($name, $title, $description, '', PARAM_TEXT);
98
$page->add($setting);
99
 
100
$name = 'theme_universe/block3herotitlesize';
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/block3herotitlecolor';
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/block3herotitleweight';
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/block3herocaption';
125
$title = get_string('block3herocaption', 'theme_universe');
126
$description = get_string('block3herocaption_desc', 'theme_universe');
127
$default = '';
128
$setting = new admin_setting_confightmleditor($name, $title, $description, $default);
129
$page->add($setting);
130
 
131
$name = 'theme_universe/block3img';
132
$title = get_string('block3img', 'theme_universe');
133
$description = get_string('block3img_desc', 'theme_universe');
134
$opts = array('accepted_types' => array('.jpg, .png, .gif'), 'maxfiles' => 1);
135
$setting = new admin_setting_configstoredfile($name, $title, $description, 'block3img', 0, $opts);
136
$page->add($setting);
137
 
138
$name = 'theme_universe/block3htmlcontent';
139
$title = get_string('blockhtmlcontent', 'theme_universe');
140
$description = get_string('blockhtmlcontent_desc', 'theme_universe');
141
$default = '';
142
$setting = new universe_setting_confightmleditor($name, $title, $description, $default);
143
$page->add($setting);
144
 
145
$name = 'theme_universe/block3footercontent';
146
$title = get_string('blockfootercontent', 'theme_universe');
147
$description = get_string('blockfootercontent_desc', 'theme_universe');
148
$default = '';
149
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
150
$page->add($setting);
151
 
152
$settings->add($page);