Commit ea39e536 authored by Mike Kelly's avatar Mike Kelly Committed by Richard Mansfield
Browse files

Add option to set default user setting for 'resize images on upload'.



This is dependent on whether the user option is enabled in file config settings.
The option controls whether the check box in the filebrowser form element to
enable resizing images on upload is checked by default or not, on a
per-user basis.

Change-Id: Id49b75bc08280b63ff57d3e0515b8513b08f1395
Signed-off-by: default avatarMike Kelly <m.f.kelly@arts.ac.uk>
parent 25caa5d1
......@@ -210,6 +210,7 @@ function expected_account_preferences() {
'showhomeinfo' => 1,
'mobileuploadtoken' => '',
'theme' => '',
'resizeonuploaduserdefault' => 1,
);
}
......@@ -326,6 +327,14 @@ function general_account_prefs_form_elements($prefs) {
'defaultvalue' => isset($prefs->mobileuploadtoken) ? $prefs->mobileuploadtoken : get_config('mobileuploadtoken')
);
}
if (get_config_plugin('artefact', 'file', 'resizeonuploadenable')) {
$elements['resizeonuploaduserdefault'] = array(
'type' => 'checkbox',
'title' => get_string('resizeonuploaduserdefault', 'account'),
'description' => get_string('resizeonuploaduserdefaultdescription', 'account'),
'defaultvalue' => $prefs->resizeonuploaduserdefault,
);
}
return $elements;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment