diff --git a/admin/classes/local/settings/filesize.php b/admin/classes/local/settings/filesize.php index e5a6edbaf90..3352f1ec375 100644 --- a/admin/classes/local/settings/filesize.php +++ b/admin/classes/local/settings/filesize.php @@ -178,6 +178,7 @@ class filesize extends \admin_setting { 'id' => $this->get_id(), 'name' => $this->get_full_name(), 'value' => $data['v'], + 'readonly' => $this->is_readonly(), 'options' => array_map(function($unit, $title) use ($data, $defaultunit) { return [ 'value' => $unit, diff --git a/admin/templates/setting_configcheckbox.mustache b/admin/templates/setting_configcheckbox.mustache index f41e5a27fbc..48e0471ee27 100644 --- a/admin/templates/setting_configcheckbox.mustache +++ b/admin/templates/setting_configcheckbox.mustache @@ -25,6 +25,7 @@ * value - yes value * id - element id * checked - boole + * readonly - bool Example context (json): { @@ -32,10 +33,11 @@ "no": "False", "value": "True", "id": "test0", - "checked": "checked" + "checked": "checked", + "readonly": false } }}