mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-33582 Filepicker: set main file button disabled when not required
This commit is contained in:
parent
778121751d
commit
247804bcc2
@ -814,8 +814,8 @@ M.form_filemanager.init = function(Y, options) {
|
||||
e.preventDefault();
|
||||
var params = {};
|
||||
var fileinfo = this.selectui.fileinfo;
|
||||
if (fileinfo.type == 'folder') {
|
||||
// this button should not even be shown for folders
|
||||
if (!this.enablemainfile || fileinfo.type == 'folder') {
|
||||
// this button should not even be shown for folders or when mainfile is disabled
|
||||
return;
|
||||
}
|
||||
params['filepath'] = fileinfo.filepath;
|
||||
|
Loading…
x
Reference in New Issue
Block a user