From 2cf329b0a3b40219e6f2979c3398598b7a1591de Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Wed, 8 May 2024 14:09:49 +0200 Subject: [PATCH] #13603 added message in welcome modal for user not pm --- .../include/class/WelcomeWindow.class.php | 26 ++++++++++++++++--- pandora_console/include/styles/pandora.css | 11 ++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/class/WelcomeWindow.class.php b/pandora_console/include/class/WelcomeWindow.class.php index 5f2efd4f40..085ea5fdc2 100644 --- a/pandora_console/include/class/WelcomeWindow.class.php +++ b/pandora_console/include/class/WelcomeWindow.class.php @@ -378,6 +378,8 @@ class WelcomeWindow extends Wizard 'class' => 'modal', ]; + $output = ''; + if (check_acl($config['id_user'], 0, 'PM')) { $flag_um = false; $flag_cm = false; @@ -590,6 +592,18 @@ class WelcomeWindow extends Wizard if ($flag_um === false || $flag_cm === false || $flag_su === false || $flag_lv === false) { $flag_task = true; } + } else { + $output .= html_print_div( + [ + 'class' => 'flex-column-start welcome-message-no-pm', + 'content' => ' +

'._('Hi!').'

+

'.__('It seems you are new to Pandora FMS.').'
+ '.__('If you want to watch videos on how to use Pandora FMS, you can visit our ').''.__('YouTube channel.').'

+

'.__('Are you familiar with ').''.__('our eLearning system?').''._(' It\'s completely free for PAO (Operation) and PAT (Administration) courses. Learn how to use Pandora FMS at your own pace.').'

', + ], + true + ); } // Task to do. @@ -657,10 +671,16 @@ class WelcomeWindow extends Wizard ], ]; - $output = $this->printForm( + $output = html_print_div( [ - 'form' => $form, - 'inputs' => $inputs, + 'content' => $output.$this->printForm( + [ + 'form' => $form, + 'inputs' => $inputs, + ], + true + ), + 'class' => 'column-left w50p', ], true ); diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 8e340928f7..1efcae79ae 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -14315,3 +14315,14 @@ div.fixed-bottom-box.tree-view-bottom-modal { .bg-image-none { background-image: none !important; } +.welcome-message-no-pm h2 { + font-size: 20px !important; + margin: 0px; +} +.welcome-message-no-pm p, +.welcome-message-no-pm b { + font-size: 15px !important; +} +.welcome-message-no-pm { + margin-bottom: 30px; +}