MDL-60817 file: Populate header only if exists
authorPeter Dias <peter@moodle.com>
Thu, 19 Mar 2020 04:00:03 +0000 (12:00 +0800)
committerVíctor Déniz Falcón <victor@moodle.com>
Thu, 19 Mar 2020 15:29:36 +0000 (15:29 +0000)
lib/form/filemanager.js

index 950a002..b3ebb6e 100644 (file)
@@ -875,7 +875,9 @@ M.form_filemanager.init = function(Y, options) {
                 node.one('.fp-dlg-butcancel').on('click', handle_cancel, this);
             }
             this.confirm_dlg.dlgopt = dialog_options;
                 node.one('.fp-dlg-butcancel').on('click', handle_cancel, this);
             }
             this.confirm_dlg.dlgopt = dialog_options;
-            this.confirm_dlg.set('headerContent', dialog_options.header);
+            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();
         },
             this.confirm_dlg_node.one('.fp-dlg-text').setContent(dialog_options.message);
             this.confirm_dlg.show();
         },