1 |
efrain |
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 2023 Marcin Czaja (https://rosea.io)
|
|
|
21 |
* @license Commercial https://themeforest.net/licenses
|
|
|
22 |
*
|
|
|
23 |
*/
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
defined('MOODLE_INTERNAL') || die();
|
|
|
27 |
|
|
|
28 |
// Login settings.
|
|
|
29 |
$page = new admin_settingpage('theme_universe_settingslogin', get_string('settingslogin', 'theme_universe'));
|
|
|
30 |
|
|
|
31 |
$name = 'theme_universe/hlogin';
|
|
|
32 |
$heading = get_string('hlogin', 'theme_universe');
|
|
|
33 |
$setting = new admin_setting_heading($name, $heading, format_text(get_string('hlogin_desc', 'theme_universe'), FORMAT_MARKDOWN));
|
|
|
34 |
$page->add($setting);
|
|
|
35 |
|
|
|
36 |
$name = 'theme_universe/setloginlayout';
|
|
|
37 |
$title = get_string('setloginlayout', 'theme_universe');
|
|
|
38 |
$description = get_string('setloginlayout_desc', 'theme_universe');
|
|
|
39 |
$options = [];
|
|
|
40 |
$options[1] = get_string('loginlayout1', 'theme_universe');
|
|
|
41 |
$options[2] = get_string('loginlayout2', 'theme_universe');
|
|
|
42 |
$options[3] = get_string('loginlayout3', 'theme_universe');
|
|
|
43 |
$options[4] = get_string('loginlayout4', 'theme_universe');
|
|
|
44 |
$options[5] = get_string('loginlayout5', 'theme_universe');
|
|
|
45 |
$setting = new admin_setting_configselect($name, $title, $description, 1, $options);
|
|
|
46 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
|
47 |
$page->add($setting);
|
|
|
48 |
|
|
|
49 |
$name = 'theme_universe/loginidprovtop';
|
|
|
50 |
$title = get_string('loginidprovtop', 'theme_universe');
|
|
|
51 |
$description = get_string('loginidprovtop_desc', 'theme_universe');
|
|
|
52 |
$default = 0;
|
|
|
53 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
|
|
54 |
$page->add($setting);
|
|
|
55 |
|
|
|
56 |
$name = 'theme_universe/hideforgotpassword';
|
|
|
57 |
$title = get_string('hideforgotpassword', 'theme_universe');
|
|
|
58 |
$description = get_string('hideforgotpassword_desc', 'theme_universe');
|
|
|
59 |
$default = 0;
|
|
|
60 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
|
|
61 |
$page->add($setting);
|
|
|
62 |
|
|
|
63 |
$name = 'theme_universe/customloginlogo';
|
|
|
64 |
$title = get_string('customloginlogo', 'theme_universe');
|
|
|
65 |
$description = get_string('customloginlogo_desc', 'theme_universe');
|
|
|
66 |
$opts = array('accepted_types' => array('.png', '.jpg', '.gif', '.svg'));
|
|
|
67 |
$setting = new admin_setting_configstoredfile($name, $title, $description, 'customloginlogo', 0, $opts);
|
|
|
68 |
$page->add($setting);
|
|
|
69 |
|
|
|
70 |
$name = 'theme_universe/loginlogooutside';
|
|
|
71 |
$title = get_string('loginlogooutside', 'theme_universe');
|
|
|
72 |
$description = get_string('loginlogooutside_desc', 'theme_universe');
|
|
|
73 |
$default = 0;
|
|
|
74 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
|
|
75 |
$page->add($setting);
|
|
|
76 |
|
|
|
77 |
$name = 'theme_universe/customsignupoutside';
|
|
|
78 |
$title = get_string('customsignupoutside', 'theme_universe');
|
|
|
79 |
$description = get_string('customsignupoutside_desc', 'theme_universe');
|
|
|
80 |
$default = 1;
|
|
|
81 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
|
|
82 |
$page->add($setting);
|
|
|
83 |
|
|
|
84 |
$name = 'theme_universe/loginbg';
|
|
|
85 |
$title = get_string('loginbg', 'theme_universe');
|
|
|
86 |
$description = get_string('loginbg_desc', 'theme_universe');
|
|
|
87 |
$opts = array('accepted_types' => array('.png', '.jpg', '.gif', '.webp', '.tiff', '.svg'));
|
|
|
88 |
$setting = new admin_setting_configstoredfile($name, $title, $description, 'loginbg', 0, $opts);
|
|
|
89 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
|
90 |
$page->add($setting);
|
|
|
91 |
|
|
|
92 |
$name = 'theme_universe/loginbgcolor';
|
|
|
93 |
$title = get_string('loginbgcolor', 'theme_universe');
|
|
|
94 |
$description = get_string('loginbgcolor_desc', 'theme_universe');
|
|
|
95 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
|
|
96 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
|
97 |
$page->add($setting);
|
|
|
98 |
|
|
|
99 |
$name = 'theme_universe/logininfobox';
|
|
|
100 |
$title = get_string('logininfobox', 'theme_universe');
|
|
|
101 |
$description = get_string('logininfobox_desc', 'theme_universe', $a);
|
|
|
102 |
$default = '';
|
|
|
103 |
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
|
|
|
104 |
$page->add($setting);
|
|
|
105 |
|
|
|
106 |
$name = 'theme_universe/loginintrotext';
|
|
|
107 |
$title = get_string('loginintrotext', 'theme_universe');
|
|
|
108 |
$description = get_string('loginintrotext_desc', 'theme_universe');
|
|
|
109 |
$default = '';
|
|
|
110 |
$setting = new universe_setting_confightmleditor($name, $title, $description, $default);
|
|
|
111 |
$page->add($setting);
|
|
|
112 |
|
|
|
113 |
$name = 'theme_universe/loginhtmlcontent1';
|
|
|
114 |
$title = get_string('loginhtmlcontent1', 'theme_universe');
|
|
|
115 |
$description = get_string('loginhtmlcontent1_desc', 'theme_universe');
|
|
|
116 |
$default = '';
|
|
|
117 |
$setting = new universe_setting_confightmleditor($name, $title, $description, $default);
|
|
|
118 |
$page->add($setting);
|
|
|
119 |
|
|
|
120 |
$name = 'theme_universe/loginhtmlcontent2';
|
|
|
121 |
$title = get_string('loginhtmlcontent2', 'theme_universe');
|
|
|
122 |
$description = get_string('loginhtmlcontent2_desc', 'theme_universe');
|
|
|
123 |
$default = '';
|
|
|
124 |
$setting = new universe_setting_confightmleditor($name, $title, $description, $default);
|
|
|
125 |
$page->add($setting);
|
|
|
126 |
|
|
|
127 |
$name = 'theme_universe/loginhtmlblockbottom';
|
|
|
128 |
$title = get_string('loginhtmlblockbottom', 'theme_universe');
|
|
|
129 |
$description = get_string('loginhtmlblockbottom_desc', 'theme_universe');
|
|
|
130 |
$default = '';
|
|
|
131 |
$setting = new universe_setting_confightmleditor($name, $title, $description, $default);
|
|
|
132 |
$page->add($setting);
|
|
|
133 |
|
|
|
134 |
$name = 'theme_universe/loginhtmlcontent3';
|
|
|
135 |
$title = get_string('loginhtmlcontent3', 'theme_universe');
|
|
|
136 |
$description = get_string('loginhtmlcontent3_desc', 'theme_universe');
|
|
|
137 |
$default = '';
|
|
|
138 |
$setting = new universe_setting_confightmleditor($name, $title, $description, $default);
|
|
|
139 |
$page->add($setting);
|
|
|
140 |
|
|
|
141 |
$name = 'theme_universe/loginfootercontent';
|
|
|
142 |
$title = get_string('loginfootercontent', 'theme_universe');
|
|
|
143 |
$description = get_string('loginfootercontent_desc', 'theme_universe');
|
|
|
144 |
$default = '<span class="small text-center">Copyright © <strong>2022</strong></span>';
|
|
|
145 |
$setting = new universe_setting_confightmleditor($name, $title, $description, $default);
|
|
|
146 |
$page->add($setting);
|
|
|
147 |
|
|
|
148 |
$name = 'theme_universe/logincustomfooterhtml';
|
|
|
149 |
$title = get_string('logincustomfooterhtml', 'theme_universe');
|
|
|
150 |
$description = get_string('logincustomfooterhtml_desc', 'theme_universe');
|
|
|
151 |
$default = '';
|
|
|
152 |
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
|
|
|
153 |
$page->add($setting);
|
|
|
154 |
|
|
|
155 |
$name = 'theme_universe/stringca';
|
|
|
156 |
$title = get_string('stringca', 'theme_universe');
|
|
|
157 |
$description = get_string('stringca_desc', 'theme_universe');
|
|
|
158 |
$default = 'Don\'t have an account?';
|
|
|
159 |
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
|
|
|
160 |
$page->add($setting);
|
|
|
161 |
|
|
|
162 |
$name = 'theme_universe/hsignup';
|
|
|
163 |
$heading = get_string('hsignup', 'theme_universe');
|
|
|
164 |
$setting = new admin_setting_heading($name, $heading, format_text(get_string('hsignup_desc', 'theme_universe'), FORMAT_MARKDOWN));
|
|
|
165 |
$page->add($setting);
|
|
|
166 |
|
|
|
167 |
$name = 'theme_universe/stringbacktologin';
|
|
|
168 |
$title = get_string('stringbacktologin', 'theme_universe');
|
|
|
169 |
$description = get_string('stringbacktologin_desc', 'theme_universe');
|
|
|
170 |
$default = 'Already have an account?';
|
|
|
171 |
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
|
|
|
172 |
$page->add($setting);
|
|
|
173 |
|
|
|
174 |
$name = 'theme_universe/signupintrotext';
|
|
|
175 |
$title = get_string('signupintrotext', 'theme_universe');
|
|
|
176 |
$description = get_string('signupintrotext_desc', 'theme_universe');
|
|
|
177 |
$default = '';
|
|
|
178 |
$setting = new universe_setting_confightmleditor($name, $title, $description, $default);
|
|
|
179 |
$page->add($setting);
|
|
|
180 |
|
|
|
181 |
$name = 'theme_universe/signuptext';
|
|
|
182 |
$title = get_string('signuptext', 'theme_universe');
|
|
|
183 |
$description = get_string('signuptext_desc', 'theme_universe');
|
|
|
184 |
$default = '';
|
|
|
185 |
$setting = new universe_setting_confightmleditor($name, $title, $description, $default);
|
|
|
186 |
$page->add($setting);
|
|
|
187 |
|
|
|
188 |
$settings->add($page);
|