Línea 14... |
Línea 14... |
14 |
// You should have received a copy of the GNU General Public License
|
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/>.
|
15 |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
Línea 16... |
Línea 16... |
16 |
|
16 |
|
17 |
/**
|
17 |
/**
|
18 |
*
|
18 |
*
|
19 |
* @package theme_universe
|
19 |
* @package theme_universe_child
|
20 |
* @copyright 2023 Marcin Czaja (https://rosea.io)
|
20 |
* @copyright 2023 Marcin Czaja (https://rosea.io)
|
21 |
* @license Commercial https://themeforest.net/licenses
|
21 |
* @license Commercial https://themeforest.net/licenses
|
22 |
*
|
22 |
*
|
Línea 23... |
Línea 23... |
23 |
*/
|
23 |
*/
|
Línea 24... |
Línea 24... |
24 |
|
24 |
|
Línea 25... |
Línea 25... |
25 |
defined('MOODLE_INTERNAL') || die();
|
25 |
defined('MOODLE_INTERNAL') || die();
|
26 |
|
26 |
|
27 |
$page = new admin_settingpage('theme_universe_settingstopbar', get_string( 'settingstopbar', 'theme_universe'));
|
27 |
$page = new admin_settingpage('theme_universe_settingstopbar', get_string('settingstopbar', 'theme_universe_child'));
|
28 |
|
28 |
|
29 |
$name = 'theme_universe/topbarscss';
|
29 |
$name = 'theme_universe_child/topbarscss';
|
Línea 30... |
Línea 30... |
30 |
$title = get_string('topbarscss', 'theme_universe');
|
30 |
$title = get_string('topbarscss', 'theme_universe_child');
|
31 |
$description = get_string('topbarscss_desc', 'theme_universe');
|
31 |
$description = get_string('topbarscss_desc', 'theme_universe_child');
|
Línea 38... |
Línea 38... |
38 |
'myhome' => get_string('myhome'),
|
38 |
'myhome' => get_string('myhome'),
|
39 |
'courses' => get_string('mycourses')
|
39 |
'courses' => get_string('mycourses')
|
40 |
);
|
40 |
);
|
Línea 41... |
Línea 41... |
41 |
|
41 |
|
42 |
// General settings.
|
42 |
// General settings.
|
43 |
$name = 'theme_universe/hlogoareageneral';
|
43 |
$name = 'theme_universe_child/hlogoareageneral';
|
44 |
$heading = get_string('hlogoareageneral', 'theme_universe');
|
44 |
$heading = get_string('hlogoareageneral', 'theme_universe_child');
|
45 |
$title = get_string('hlogoareageneral_desc', 'theme_universe');
|
45 |
$title = get_string('hlogoareageneral_desc', 'theme_universe_child');
|
46 |
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
|
46 |
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
|
Línea 47... |
Línea 47... |
47 |
$page->add($setting);
|
47 |
$page->add($setting);
|
48 |
|
48 |
|
49 |
// Setting: Hide nodes in primary navigation.
|
49 |
// Setting: Hide nodes in primary navigation.
|
50 |
$name = 'theme_universe/hidenodesprimarynavigation';
|
50 |
$name = 'theme_universe_child/hidenodesprimarynavigation';
|
51 |
$title = get_string('hidenodesprimarynavigationsetting', 'theme_universe', null, true);
|
51 |
$title = get_string('hidenodesprimarynavigationsetting', 'theme_universe_child', null, true);
|
52 |
$description = get_string('hidenodesprimarynavigationsetting_desc', 'theme_universe', null, true);
|
52 |
$description = get_string('hidenodesprimarynavigationsetting_desc', 'theme_universe_child', null, true);
|
53 |
$setting = new admin_setting_configmulticheckbox($name, $title, $description, array(), $hidenodesoptions);
|
53 |
$setting = new admin_setting_configmulticheckbox($name, $title, $description, array(), $hidenodesoptions);
|
Línea 54... |
Línea 54... |
54 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
54 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
55 |
$page->add($setting);
|
55 |
$page->add($setting);
|
56 |
|
56 |
|
57 |
$name = 'theme_universe/topbareditmode';
|
57 |
$name = 'theme_universe_child/topbareditmode';
|
58 |
$title = get_string('topbareditmode', 'theme_universe');
|
58 |
$title = get_string('topbareditmode', 'theme_universe_child');
|
59 |
$description = get_string('topbareditmode_desc', 'theme_universe', $a);
|
59 |
$description = get_string('topbareditmode_desc', 'theme_universe_child', $a);
|
60 |
$default = 0;
|
60 |
$default = 0;
|
Línea 61... |
Línea 61... |
61 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
61 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
62 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
62 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
63 |
$page->add($setting);
|
63 |
$page->add($setting);
|
64 |
|
64 |
|
65 |
$name = 'theme_universe/topbarcustomhtml';
|
65 |
$name = 'theme_universe_child/topbarcustomhtml';
|
66 |
$title = get_string('topbarcustomhtml', 'theme_universe');
|
66 |
$title = get_string('topbarcustomhtml', 'theme_universe_child');
|
Línea 67... |
Línea 67... |
67 |
$description = get_string('topbarcustomhtml_desc', 'theme_universe', $a);
|
67 |
$description = get_string('topbarcustomhtml_desc', 'theme_universe_child', $a);
|
68 |
$default = '';
|
68 |
$default = '';
|
69 |
$setting = new admin_setting_confightmleditor($name, $title, $description, $default);
|
69 |
$setting = new admin_setting_confightmleditor($name, $title, $description, $default);
|
70 |
$page->add($setting);
|
70 |
$page->add($setting);
|
71 |
|
71 |
|
72 |
// Custom Logo.
|
72 |
// Custom Logo.
|
Línea 73... |
Línea 73... |
73 |
$name = 'theme_universe/hlogoarea';
|
73 |
$name = 'theme_universe_child/hlogoarea';
|
74 |
$heading = get_string('hlogoarea', 'theme_universe');
|
74 |
$heading = get_string('hlogoarea', 'theme_universe_child');
|
75 |
$title = get_string('hlogoarea_desc', 'theme_universe');
|
75 |
$title = get_string('hlogoarea_desc', 'theme_universe_child');
|
76 |
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
|
76 |
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
|
77 |
$page->add($setting);
|
77 |
$page->add($setting);
|
78 |
|
78 |
|
79 |
$name = 'theme_universe/topbarlogoareaon';
|
79 |
$name = 'theme_universe_child/topbarlogoareaon';
|
Línea 80... |
Línea 80... |
80 |
$title = get_string('topbarlogoareaon', 'theme_universe');
|
80 |
$title = get_string('topbarlogoareaon', 'theme_universe_child');
|
81 |
$description = get_string('topbarlogoareaon_desc', 'theme_universe');
|
81 |
$description = get_string('topbarlogoareaon_desc', 'theme_universe_child');
|
82 |
$default = 1;
|
82 |
$default = 1;
|
83 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
83 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
84 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
84 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
85 |
$page->add($setting);
|
85 |
$page->add($setting);
|
Línea 86... |
Línea 86... |
86 |
|
86 |
|
87 |
$name = 'theme_universe/customlogo';
|
87 |
$name = 'theme_universe_child/customlogo';
|
88 |
$title = get_string('customlogo', 'theme_universe');
|
88 |
$title = get_string('customlogo', 'theme_universe_child');
|
89 |
$description = get_string('customlogo_desc', 'theme_universe');
|
89 |
$description = get_string('customlogo_desc', 'theme_universe_child');
|
90 |
$opts = array('accepted_types' => array('.png', '.jpg', '.svg', 'gif'));
|
90 |
$opts = array('accepted_types' => array('.png', '.jpg', '.svg', 'gif'));
|
91 |
$setting = new admin_setting_configstoredfile($name, $title, $description, 'customlogo', 0, $opts);
|
91 |
$setting = new admin_setting_configstoredfile($name, $title, $description, 'customlogo', 0, $opts);
|
Línea 92... |
Línea 92... |
92 |
$page->add($setting);
|
92 |
$page->add($setting);
|
93 |
|
93 |
|
94 |
$name = 'theme_universe/customdmlogo';
|
94 |
$name = 'theme_universe_child/customdmlogo';
|
95 |
$title = get_string('customdmlogo', 'theme_universe');
|
95 |
$title = get_string('customdmlogo', 'theme_universe_child');
|
96 |
$description = get_string('customdmlogo_desc', 'theme_universe');
|
96 |
$description = get_string('customdmlogo_desc', 'theme_universe_child');
|
97 |
$opts = array('accepted_types' => array('.png', '.jpg', '.svg', 'gif'));
|
97 |
$opts = array('accepted_types' => array('.png', '.jpg', '.svg', 'gif'));
|
98 |
$setting = new admin_setting_configstoredfile($name, $title, $description, 'customdmlogo', 0, $opts);
|
98 |
$setting = new admin_setting_configstoredfile($name, $title, $description, 'customdmlogo', 0, $opts);
|
Línea 99... |
Línea 99... |
99 |
$page->add($setting);
|
99 |
$page->add($setting);
|
100 |
|
100 |
|
101 |
$name = 'theme_universe/navbarlogobox';
|
101 |
$name = 'theme_universe_child/navbarlogobox';
|
102 |
$title = get_string('navbarlogobox', 'theme_universe');
|
102 |
$title = get_string('navbarlogobox', 'theme_universe_child');
|
103 |
$description = get_string('navbarlogobox_desc', 'theme_universe', $a);
|
103 |
$description = get_string('navbarlogobox_desc', 'theme_universe_child', $a);
|
104 |
$default = 0;
|
104 |
$default = 0;
|
105 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
105 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
Línea 106... |
Línea 106... |
106 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
106 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
107 |
$page->add($setting);
|
107 |
$page->add($setting);
|
108 |
|
108 |
|
109 |
$name = 'theme_universe/customlogoandname';
|
109 |
$name = 'theme_universe_child/customlogoandname';
|
110 |
$title = get_string('customlogoandname', 'theme_universe');
|
110 |
$title = get_string('customlogoandname', 'theme_universe_child');
|
111 |
$description = get_string('customlogoandname_desc', 'theme_universe');
|
111 |
$description = get_string('customlogoandname_desc', 'theme_universe_child');
|
Línea 112... |
Línea 112... |
112 |
$default = 1;
|
112 |
$default = 1;
|
113 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
113 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
114 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
114 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
115 |
$page->add($setting);
|
115 |
$page->add($setting);
|
116 |
|
116 |
|
117 |
$name = 'theme_universe/customlogotxt';
|
117 |
$name = 'theme_universe_child/customlogotxt';
|
Línea 118... |
Línea 118... |
118 |
$title = get_string('customlogotxt', 'theme_universe');
|
118 |
$title = get_string('customlogotxt', 'theme_universe_child');
|
119 |
$description = get_string('customlogotxt_desc', 'theme_universe');
|
119 |
$description = get_string('customlogotxt_desc', 'theme_universe_child');
|
120 |
$default = 'universe';
|
120 |
$default = 'universe';
|
121 |
$setting = new admin_setting_configtext($name, $title, $description, $default);
|
121 |
$setting = new admin_setting_configtext($name, $title, $description, $default);
|
122 |
$page->add($setting);
|
122 |
$page->add($setting);
|
123 |
|
123 |
|
Línea 124... |
Línea 124... |
124 |
// Colors.
|
124 |
// Colors.
|
125 |
$name = 'theme_universe/htopbarcolors';
|
125 |
$name = 'theme_universe_child/htopbarcolors';
|
126 |
$heading = get_string('htopbarcolors', 'theme_universe');
|
126 |
$heading = get_string('htopbarcolors', 'theme_universe_child');
|
127 |
$title = get_string('htopbarcolors_desc', 'theme_universe');
|
127 |
$title = get_string('htopbarcolors_desc', 'theme_universe_child');
|
128 |
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
|
128 |
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
|
129 |
$page->add($setting);
|
129 |
$page->add($setting);
|
Línea 130... |
Línea 130... |
130 |
|
130 |
|
131 |
$name = 'theme_universe/colortopbarbg1';
|
131 |
$name = 'theme_universe_child/colortopbarbg1';
|
132 |
$title = get_string('colortopbarbg1', 'theme_universe');
|
132 |
$title = get_string('colortopbarbg1', 'theme_universe_child');
|
133 |
$description = get_string('color_desc', 'theme_universe');
|
133 |
$description = get_string('color_desc', 'theme_universe_child');
|
134 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
134 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
135 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
135 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
Línea 136... |
Línea 136... |
136 |
$page->add($setting);
|
136 |
$page->add($setting);
|
137 |
|
137 |
|
138 |
$name = 'theme_universe/dmcolortopbarbg1';
|
138 |
$name = 'theme_universe_child/dmcolortopbarbg1';
|
139 |
$title = get_string('dmcolortopbarbg1', 'theme_universe');
|
139 |
$title = get_string('dmcolortopbarbg1', 'theme_universe_child');
|
140 |
$description = get_string('color_desc', 'theme_universe');
|
140 |
$description = get_string('color_desc', 'theme_universe_child');
|
141 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
141 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
Línea 142... |
Línea 142... |
142 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
142 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
143 |
$page->add($setting);
|
143 |
$page->add($setting);
|
144 |
|
144 |
|
145 |
$name = 'theme_universe/colortopbarbg2';
|
145 |
$name = 'theme_universe_child/colortopbarbg2';
|
146 |
$title = get_string('colortopbarbg2', 'theme_universe');
|
146 |
$title = get_string('colortopbarbg2', 'theme_universe_child');
|
147 |
$description = get_string('color_desc', 'theme_universe');
|
147 |
$description = get_string('color_desc', 'theme_universe_child');
|
Línea 148... |
Línea 148... |
148 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
148 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
149 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
149 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
150 |
$page->add($setting);
|
150 |
$page->add($setting);
|
151 |
|
151 |
|
152 |
$name = 'theme_universe/dmcolortopbarbg2';
|
152 |
$name = 'theme_universe_child/dmcolortopbarbg2';
|
153 |
$title = get_string('dmcolortopbarbg2', 'theme_universe');
|
153 |
$title = get_string('dmcolortopbarbg2', 'theme_universe_child');
|
Línea 154... |
Línea 154... |
154 |
$description = get_string('color_desc', 'theme_universe');
|
154 |
$description = get_string('color_desc', 'theme_universe_child');
|
155 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
155 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
156 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
156 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
157 |
$page->add($setting);
|
157 |
$page->add($setting);
|
158 |
|
158 |
|
159 |
$name = 'theme_universe/colortopbartext';
|
159 |
$name = 'theme_universe_child/colortopbartext';
|
Línea 160... |
Línea 160... |
160 |
$title = get_string('colortopbartext', 'theme_universe');
|
160 |
$title = get_string('colortopbartext', 'theme_universe_child');
|
161 |
$description = get_string('color_desc', 'theme_universe');
|
161 |
$description = get_string('color_desc', 'theme_universe_child');
|
162 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
162 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
163 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
163 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
164 |
$page->add($setting);
|
164 |
$page->add($setting);
|
165 |
|
165 |
|
Línea 166... |
Línea 166... |
166 |
$name = 'theme_universe/colortopbarbtntext';
|
166 |
$name = 'theme_universe_child/colortopbarbtntext';
|
167 |
$title = get_string('colortopbarbtntext', 'theme_universe');
|
167 |
$title = get_string('colortopbarbtntext', 'theme_universe_child');
|
168 |
$description = get_string('color_desc', 'theme_universe');
|
168 |
$description = get_string('color_desc', 'theme_universe_child');
|
169 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
169 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
170 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
170 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
171 |
$page->add($setting);
|
171 |
$page->add($setting);
|
Línea 172... |
Línea 172... |
172 |
|
172 |
|
173 |
$name = 'theme_universe/colortopbarbtnhover';
|
173 |
$name = 'theme_universe_child/colortopbarbtnhover';
|
174 |
$title = get_string('colortopbarbtnhover', 'theme_universe');
|
174 |
$title = get_string('colortopbarbtnhover', 'theme_universe_child');
|
175 |
$description = get_string('color_desc', 'theme_universe');
|
175 |
$description = get_string('color_desc', 'theme_universe_child');
|
176 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
176 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
177 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
177 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
178 |
$page->add($setting);
|
178 |
$page->add($setting);
|
Línea 179... |
Línea 179... |
179 |
|
179 |
|
180 |
$name = 'theme_universe/colortopbarbtnhovertext';
|
180 |
$name = 'theme_universe_child/colortopbarbtnhovertext';
|
181 |
$title = get_string('colortopbarbtnhovertext', 'theme_universe');
|
181 |
$title = get_string('colortopbarbtnhovertext', 'theme_universe_child');
|
182 |
$description = get_string('color_desc', 'theme_universe');
|
182 |
$description = get_string('color_desc', 'theme_universe_child');
|
183 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
183 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
184 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
184 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
Línea 185... |
Línea 185... |
185 |
$page->add($setting);
|
185 |
$page->add($setting);
|
186 |
|
186 |
|
187 |
// Additional Button next to the Log in button.
|
187 |
// Additional Button next to the Log in button.
|
188 |
$name = 'theme_universe/hadditionalbtn';
|
188 |
$name = 'theme_universe_child/hadditionalbtn';
|
189 |
$heading = get_string('hadditionalbtn', 'theme_universe');
|
189 |
$heading = get_string('hadditionalbtn', 'theme_universe_child');
|
190 |
$title = get_string('hadditionalbtn_desc', 'theme_universe');
|
190 |
$title = get_string('hadditionalbtn_desc', 'theme_universe_child');
|
Línea 191... |
Línea 191... |
191 |
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
|
191 |
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
|