#13603 added message in welcome modal for user not pm

This commit is contained in:
Daniel Cebrian 2024-05-08 14:09:49 +02:00
parent c48627cf9a
commit 2cf329b0a3
2 changed files with 34 additions and 3 deletions

View File

@ -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' => '
<h2>'._('Hi!').'</h2>
<p class="mrgn_btn_5px">'.__('It seems you are new to Pandora FMS.').'<br />
'.__('If you want to watch videos on how to use Pandora FMS, you can visit our ').'<a href="https://www.youtube.com/@PandoraFMS" target="_blank"><b>'.__('YouTube channel.').'</b></a></p>
<p class="mrgn_top_5px">'.__('Are you familiar with ').'<a href="https://pandorafms.com/es/producto/elearning/" target="_blank"><b>'.__('our eLearning system?').'</b></a>'._(' It\'s completely free for PAO (Operation) and PAT (Administration) courses. Learn how to use Pandora FMS at your own pace.').'</p>',
],
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
);

View File

@ -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;
}