MDL-26388, pop up a dialog when attaching a file already being used in draft area.
This commit is contained in:
@@ -595,7 +595,11 @@ M.form_filemanager.init = function(Y, options) {
|
||||
scope: scope,
|
||||
params: params,
|
||||
callback: function(id, obj, args) {
|
||||
scope.refresh(obj.filepath);
|
||||
if (obj == false) {
|
||||
alert(M.str.repository.fileexists);
|
||||
} else {
|
||||
scope.refresh(obj.filepath);
|
||||
}
|
||||
Y.one('#fm-rename-input').set('value', '');
|
||||
scope.rename_dialog.hide();
|
||||
}
|
||||
|
||||
@@ -415,7 +415,10 @@ class page_requirements_manager {
|
||||
array('cancel'), array('chooselicense', 'repository'), array('author', 'repository'),
|
||||
array('ok', 'moodle'), array('error', 'moodle'), array('info', 'moodle'), array('norepositoriesavailable', 'repository'), array('norepositoriesexternalavailable', 'repository'),
|
||||
array('nofilesattached', 'repository'), array('filepicker', 'repository'),
|
||||
array('nofilesavailable', 'repository')
|
||||
array('nofilesavailable', 'repository'), array('overwrite', 'repository'),
|
||||
array('renameto', 'repository'), array('fileexists', 'repository'),
|
||||
array('fileexistsdialogheader', 'repository'), array('fileexistsdialog_editor', 'repository'),
|
||||
array('fileexistsdialog_filemanager', 'repository')
|
||||
));
|
||||
break;
|
||||
case 'core_comment':
|
||||
|
||||
Reference in New Issue
Block a user