MDL-70041 filepicker: Make sure the user has a recently used license

This commit is contained in:
Mihail Geshoski
2020-10-28 11:48:33 +08:00
parent 99680d1be4
commit 81d0642b6c
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -714,7 +714,8 @@ M.form_filemanager.init = function(Y, options) {
if (filenode) {
// File has a license already, use it.
selectedlicense = filenode.license;
} else if (this.filepicker_options.rememberuserlicensepref) {
} else if (this.filepicker_options.rememberuserlicensepref && this.get_preference('recentlicense')) {
// When 'Remember user licence preference' is enabled use the last license selected by the user, if any.
selectedlicense = this.get_preference('recentlicense');
}
var licenses = this.filepicker_options.licenses;
+2 -1
View File
@@ -1784,7 +1784,8 @@ M.core_filepicker.init = function(Y, options) {
if (filenode) {
// File has a license already, use it.
selectedlicense = filenode.license;
} else if (this.options.rememberuserlicensepref) {
} else if (this.options.rememberuserlicensepref && this.get_preference('recentlicense')) {
// When 'Remember user licence preference' is enabled use the last license selected by the user, if any.
selectedlicense = this.get_preference('recentlicense');
}
var licenses = this.options.licenses;