| Línea 30... |
Línea 30... |
| 30 |
'theme_universe_advanced',
|
30 |
'theme_universe_advanced',
|
| 31 |
get_string('advancedsettings', 'theme_universe')
|
31 |
get_string('advancedsettings', 'theme_universe')
|
| 32 |
);
|
32 |
);
|
| Línea 33... |
Línea 33... |
| 33 |
|
33 |
|
| 34 |
// H5P custom CSS.
|
34 |
// H5P custom CSS.
|
| 35 |
$setting = new admin_setting_configtextarea(
|
35 |
// $setting = new admin_setting_configtextarea(
|
| 36 |
'theme_universe/hvpcss',
|
36 |
// 'theme_universe/hvpcss',
|
| 37 |
get_string('hvpcss', 'theme_universe'),
|
37 |
// get_string('hvpcss', 'theme_universe'),
|
| 38 |
get_string('hvpcss_desc', 'theme_universe'), '');
|
38 |
// get_string('hvpcss_desc', 'theme_universe'), '');
|
| Línea 39... |
Línea 39... |
| 39 |
$page->add($setting);
|
39 |
// $page->add($setting);
|
| 40 |
|
40 |
|
| 41 |
// Raw SCSS to include before the content.
|
41 |
// Raw SCSS to include before the content.
|
| 42 |
$setting = new admin_setting_scsscode(
|
42 |
$setting = new admin_setting_scsscode(
|
| Línea 58... |
Línea 58... |
| 58 |
PARAM_RAW
|
58 |
PARAM_RAW
|
| 59 |
);
|
59 |
);
|
| 60 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
60 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
| 61 |
$page->add($setting);
|
61 |
$page->add($setting);
|
| Línea 62... |
Línea -... |
| 62 |
|
- |
|
| 63 |
// Font files upload.
|
- |
|
| 64 |
// Setting: Custom fonts.
|
- |
|
| 65 |
$name = 'theme_universe/fontfiles';
|
- |
|
| 66 |
$title = get_string('customfontssetting', 'theme_universe', null, true);
|
- |
|
| 67 |
$description = get_string('customfontssetting_desc', 'theme_universe', null, true);
|
- |
|
| 68 |
if ($registerfontsresult == true) {
|
- |
|
| 69 |
$setting = new admin_setting_configstoredfile($name, $title, $description, 'fontfiles', 0,
|
- |
|
| 70 |
['maxfiles' => -1, 'accepted_types' => theme_universe_get_webfonts_extensions()]);
|
- |
|
| 71 |
} else {
|
- |
|
| 72 |
$setting = new admin_setting_configstoredfile($name, $title, $description, 'fontfiles', 0,
|
- |
|
| 73 |
['maxfiles' => -1]);
|
- |
|
| 74 |
}
|
- |
|
| 75 |
$page->add($setting);
|
- |
|
| 76 |
|
- |
|
| 77 |
// Information: Custom fonts list.
|
- |
|
| 78 |
// Credits: Boost_Union
|
- |
|
| 79 |
// If there is at least one file uploaded.
|
- |
|
| 80 |
if (!empty(get_config('theme_universe', 'fontfiles'))) {
|
- |
|
| 81 |
// Prepare the widget.
|
- |
|
| 82 |
$name = 'theme_universe/customfontslist';
|
- |
|
| 83 |
$title = get_string('customfontslistsetting', 'theme_universe', null, true);
|
- |
|
| 84 |
$description = get_string('customfontslistsetting_desc', 'theme_universe', null, true);
|
- |
|
| 85 |
|
- |
|
| 86 |
// Append the file list to the description.
|
- |
|
| 87 |
$templatecontext = ['files' => theme_universe_get_customfonts_templatecontext()];
|
- |
|
| 88 |
$description .= $OUTPUT->render_from_template('theme_universe/settings-customfonts-filelist', $templatecontext);
|
- |
|
| 89 |
|
- |
|
| 90 |
// Finish the widget.
|
- |
|
| 91 |
$setting = new admin_setting_description($name, $title, $description);
|
- |
|
| 92 |
$page->add($setting);
|
- |
|
| 93 |
}
|
- |
|
| 94 |
|
- |
|
| 95 |
// Additional files
|
- |
|
| 96 |
$name = 'theme_universe/additionalresources';
|
- |
|
| 97 |
$title = get_string('additionalresourcessetting', 'theme_universe', null, true);
|
- |
|
| 98 |
$description = get_string('additionalresourcessetting_desc', 'theme_universe', null, true);
|
- |
|
| 99 |
$setting = new admin_setting_configstoredfile($name, $title, $description, 'additionalresources', 0,
|
- |
|
| 100 |
['maxfiles' => -1]);
|
- |
|
| 101 |
$page->add($setting);
|
- |
|
| 102 |
|
- |
|
| 103 |
// Information: Additional resources list.
|
- |
|
| 104 |
// If there is at least one file uploaded.
|
- |
|
| 105 |
if (!empty(get_config('theme_universe', 'additionalresources'))) {
|
- |
|
| 106 |
// Prepare the widget.
|
- |
|
| 107 |
$name = 'theme_universe/additionalresourceslist';
|
- |
|
| 108 |
$title = get_string('additionalresourceslistsetting', 'theme_universe', null, true);
|
- |
|
| 109 |
$description = get_string('additionalresourceslistsetting_desc', 'theme_universe', null, true).'<br /><br />'.
|
- |
|
| 110 |
get_string('resourcescachecontrolnote', 'theme_universe', null, true);
|
- |
|
| 111 |
|
- |
|
| 112 |
// Append the file list to the description.
|
- |
|
| 113 |
$templatecontext = ['files' => theme_universe_get_additionalresources_templatecontext()];
|
- |
|
| 114 |
$description .= $OUTPUT->render_from_template('theme_universe/settings-additionalresources-filelist',
|
- |
|
| 115 |
$templatecontext);
|
- |
|
| 116 |
|
- |
|
| 117 |
// Finish the widget.
|
- |
|
| 118 |
$setting = new admin_setting_description($name, $title, $description);
|
- |
|
| 119 |
$page->add($setting);
|
- |
|
| 120 |
}
|
- |
|
| 121 |
|
62 |
|