Merge branch 'MDL-69897-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE
This commit is contained in:
@@ -784,6 +784,9 @@ M.form_filemanager.init = function(Y, options) {
|
||||
node.one('.fp-dlg-butcancel').on('click', handle_cancel, this);
|
||||
}
|
||||
this.confirm_dlg.dlgopt = dialog_options;
|
||||
if (typeof dialog_options.header != 'undefined') {
|
||||
this.confirm_dlg.set('headerContent', dialog_options.header);
|
||||
}
|
||||
this.confirm_dlg_node.one('.fp-dlg-text').setContent(dialog_options.message);
|
||||
this.confirm_dlg.show();
|
||||
},
|
||||
@@ -818,10 +821,12 @@ M.form_filemanager.init = function(Y, options) {
|
||||
}, this);
|
||||
selectnode.one('.fp-file-delete').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var dialog_options = {};
|
||||
var dialog_options = {
|
||||
scope: this,
|
||||
header: M.util.get_string('confirm', 'moodle'),
|
||||
};
|
||||
var params = {};
|
||||
var fileinfo = this.selectui.fileinfo;
|
||||
dialog_options.scope = this;
|
||||
params.filepath = fileinfo.filepath;
|
||||
if (fileinfo.type == 'folder') {
|
||||
params.filename = '.';
|
||||
|
||||
@@ -171,9 +171,7 @@ class behat_filepicker extends behat_base {
|
||||
$this->perform_on_element('delete', $exception);
|
||||
|
||||
// Yes, we are sure.
|
||||
// Using xpath + click instead of pressButton as 'Ok' it is a common string.
|
||||
$okbutton = $this->find('css', 'div.fp-dlg button.fp-dlg-butconfirm');
|
||||
$okbutton->click();
|
||||
$this->execute('behat_general::i_click_on_in_the', [get_string('ok'), 'button', get_string('confirm'), 'dialogue']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user