From 727ee659ae9875402505b0416bf8c370a4f5b45b Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 30 Jan 2024 15:37:04 +0100 Subject: [PATCH] #12791 fix wizard welcome --- pandora_console/general/header.php | 33 +++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 5ad89d8d31..35b994fead 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -1021,11 +1021,14 @@ echo sprintf('
', $menuTypeClass); 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', @@ -1043,6 +1046,34 @@ echo sprintf('
', $menuTypeClass); } }) } + }, + 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() + } + }); + }); } }); });