diff --git a/CHANGES.md b/CHANGES.md index 18c16660a1db96c2994d72a06e47c3e4288f3b96..d0047fe78b9021d92101f1aa3beec645abe2a039 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,10 @@ moodle-theme_boost_campus_child Changes ------- +### Unreleased + +* 2020-06-09 - Improved SCSS settings to be used with admin_setting_scsscode that validates the code before saving. + ### v3.8-r1 * 2020-03-25 - Prepare compatibility for Moodle 3.8. diff --git a/settings.php b/settings.php index 166faf5f7842b0cf579577315ab28c8196446647..7e85ae41b3e60c05052017fec6d6759a264506d1 100644 --- a/settings.php +++ b/settings.php @@ -131,7 +131,7 @@ if ($ADMIN->fulltree) { $name = 'theme_boost_campus_child/scsspre'; $title = get_string('rawscsspre', 'theme_boost', null, true); $description = get_string('rawscsspre_desc', 'theme_boost', null, true); - $setting = new admin_setting_configtextarea($name, $title, $description, '', PARAM_RAW); + $setting = new admin_setting_scsscode($name, $title, $description, '', PARAM_RAW); $setting->set_updatedcallback('theme_reset_all_caches'); $page->add($setting); @@ -139,7 +139,7 @@ if ($ADMIN->fulltree) { $name = 'theme_boost_campus_child/scss'; $title = get_string('rawscss', 'theme_boost', null, true); $description = get_string('rawscss_desc', 'theme_boost', null, true); - $setting = new admin_setting_configtextarea($name, $title, $description, '', PARAM_RAW); + $setting = new admin_setting_scsscode($name, $title, $description, '', PARAM_RAW); $setting->set_updatedcallback('theme_reset_all_caches'); $page->add($setting);