diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 2c6661c1f6..a77e63b95b 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -770,11 +770,14 @@ $("#conf_wizard").click(function() { modal: { title: "", cancel: '', - ok: '' + ok: '', + overlay: true, + overlayExtraClass: 'welcome-overlay', }, onshow: { page: 'include/ajax/welcome_window', method: 'loadWelcomeWindow', + width: 1000, }, oncancel: { page: 'include/ajax/welcome_window', @@ -792,6 +795,34 @@ $("#conf_wizard").click(function() { } }) } + }, + onload: () => { + $(document).ready(function () { + var buttonpane = $("div[aria-describedby='welcome_modal_window'] .ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix"); + $(buttonpane).append(` +
+ `); + + var closeWizard = $("button.close-wizard-button"); + + $(closeWizard).click(function (e) { + var close = $("div[aria-describedby='welcome_modal_window'] button.sub.ok.submit-next.ui-button"); + var cancel = $("div[aria-describedby='welcome_modal_window'] button.sub.upd.submit-cancel.ui-button"); + var checkbox = $("div[aria-describedby='welcome_modal_window'] .welcome-wizard-do-not-show:checked").length; + + if (checkbox === 1) { + $(cancel).click(); + } else { + $(close).click() + } + }); + }); } }); });