MDL-52167 admin: now able to show/hide settings based on conditions

This commit is contained in:
Davo Smith
2019-02-26 15:45:35 +01:00
committed by Sara Arjona
parent 2bc0774cc1
commit 8ed3671d4c
4 changed files with 459 additions and 0 deletions
+7
View File
@@ -156,4 +156,11 @@ $PAGE->requires->yui_module('moodle-core-formchangechecker',
);
$PAGE->requires->string_for_js('changesmadereallygoaway', 'moodle');
if ($settingspage->has_dependencies()) {
$opts = [
'dependencies' => $settingspage->get_dependencies_for_javascript()
];
$PAGE->requires->js_call_amd('core/showhidesettings', 'init', [$opts]);
}
echo $OUTPUT->footer();