mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
About meta and observer input password
This commit is contained in:
parent
310ad88707
commit
b18a689225
@ -2572,6 +2572,17 @@ function html_print_input_text_extended(
|
|||||||
$output .= 'alt="'.$alt.'" ';
|
$output .= 'alt="'.$alt.'" ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($hide_div_eye !== false) {
|
||||||
|
echo "<script>
|
||||||
|
$(document).ready (function () {
|
||||||
|
$('input[name=\"".$name."\"]').val(\"".$value."\")
|
||||||
|
|
||||||
|
observerInputPassword('".$name."');
|
||||||
|
});
|
||||||
|
</script>";
|
||||||
|
$value = '';
|
||||||
|
}
|
||||||
|
|
||||||
// Attributes specified by function call.
|
// Attributes specified by function call.
|
||||||
$attrs = [
|
$attrs = [
|
||||||
'name' => 'unnamed',
|
'name' => 'unnamed',
|
||||||
|
@ -881,6 +881,20 @@ if (is_ajax()) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$image_about = ui_get_full_url('/enterprise/images/custom_logo/pandoraFMS_metaconsole_full.svg', false, false, false);
|
||||||
|
|
||||||
|
if ($config['meta_custom_logo'] === 'pandoraFMS_metaconsole_full.svg') {
|
||||||
|
$image_about = 'images/custom_logo/'.$config['meta_custom_logo'];
|
||||||
|
} else {
|
||||||
|
$image_about = '../images/custom_logo/'.$config['meta_custom_logo'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file_exists(ENTERPRISE_DIR.'/'.$image_about) === true) {
|
||||||
|
$image_about = $image_about;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$dialog = '
|
$dialog = '
|
||||||
<div id="about-tabs" class="invisible overflow-hidden">
|
<div id="about-tabs" class="invisible overflow-hidden">
|
||||||
<ul>
|
<ul>
|
||||||
@ -896,23 +910,24 @@ if (is_ajax()) {
|
|||||||
<table class="table-about">
|
<table class="table-about">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 40%;">
|
<th style="width: 40%; border: 0px;">
|
||||||
<img src="'.$image_about.'" alt="logo" width="70%">
|
<img src="'.$image_about.'" alt="logo" width="70%">
|
||||||
</th>
|
</th>
|
||||||
<th style="width: 60%; text-align: left;">
|
<th style="width: 60%; text-align: left; border: 0px;">
|
||||||
<h1>'.$product_name.'</h1>
|
<h1>'.$product_name.'</h1>
|
||||||
<p><span>'.__('Version').' '.$pandora_version.' - '.(enterprise_installed() ? 'Enterprise' : 'Community').'</span></p>
|
<p><span>'.__('Version').' '.$pandora_version.' - '.(enterprise_installed() ? 'Enterprise' : 'Community').'</span></p>
|
||||||
<p><span>'.__('MR version').'</span> MR'.$config['MR'].'</p>
|
<p><span>'.__('MR version').'</span> MR'.$config['MR'].'</p>
|
||||||
<p><span>'.__('Build').'</span> '.$build_version.'</p>
|
<p><span>'.__('Build').'</span> '.$build_version.'</p>
|
||||||
<p style="margin-bottom: 20px!important;"><span>'.__('Support expires').'</span> 2023/04/26</p>';
|
<p style="margin-bottom: 20px!important;"><span>'.__('Support expires').'</span> 2023/04/26</p>';
|
||||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true) {
|
|
||||||
|
if (((bool) check_acl($config['id_user'], 0, 'PM') === true) && (is_metaconsole() === false)) {
|
||||||
$dialogButtons = [];
|
$dialogButtons = [];
|
||||||
|
|
||||||
$dialogButtons[] = html_print_button(
|
$dialogButtons[] = html_print_button(
|
||||||
__('Update manager'),
|
__('Update manager'),
|
||||||
'update_manager',
|
'update_manager',
|
||||||
false,
|
false,
|
||||||
'location.href=\''.ui_get_full_url('/index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=history', false, false, false).'\'',
|
'location.href="'.ui_get_full_url('/index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=history', false, false, false).'"',
|
||||||
[
|
[
|
||||||
'icon' => 'cog',
|
'icon' => 'cog',
|
||||||
'mode' => 'mini secondary',
|
'mode' => 'mini secondary',
|
||||||
@ -924,7 +939,7 @@ if (is_ajax()) {
|
|||||||
__('System report'),
|
__('System report'),
|
||||||
'system_report',
|
'system_report',
|
||||||
false,
|
false,
|
||||||
'location.href=\''.ui_get_full_url('/index.php?sec=gextensions&sec2=tools/diagnostics', false, false, false).'\'',
|
'location.href="'.ui_get_full_url('/index.php?sec=gextensions&sec2=tools/diagnostics', false, false, false).'"',
|
||||||
[
|
[
|
||||||
'icon' => 'info',
|
'icon' => 'info',
|
||||||
'mode' => 'mini secondary',
|
'mode' => 'mini secondary',
|
||||||
|
@ -2352,3 +2352,18 @@ function show_hide_password(e, url) {
|
|||||||
inputPass.style.backgroundImage = "url(" + url + "/images/enable.svg)";
|
inputPass.style.backgroundImage = "url(" + url + "/images/enable.svg)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add observer to clear value when type attribute changes.
|
||||||
|
function observerInputPassword(name) {
|
||||||
|
const observer = new MutationObserver(function(mutations) {
|
||||||
|
mutations.forEach(function(mutation) {
|
||||||
|
if (mutation.type === "attributes" && mutation.attributeName === "type") {
|
||||||
|
mutation.target.value = "";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
Array.from($("input[type=password]")).forEach(function(input) {
|
||||||
|
observer.observe(input, { attributes: true });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -2414,8 +2414,7 @@ try {
|
|||||||
|
|
||||||
// Close.
|
// Close.
|
||||||
$active_filters_div .= '</div>';
|
$active_filters_div .= '</div>';
|
||||||
$active_filters_div .= '<div id="events_buffers_display"></div>';
|
// $active_filters_div .= '<div id="events_buffers_display"></div>';
|
||||||
|
|
||||||
$table_id = 'table_events';
|
$table_id = 'table_events';
|
||||||
$form_id = 'events_form';
|
$form_id = 'events_form';
|
||||||
|
|
||||||
@ -2491,6 +2490,9 @@ try {
|
|||||||
ui_print_error_message($e->getMessage());
|
ui_print_error_message($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Close.
|
||||||
|
echo '<div id="events_buffers_display"></div>';
|
||||||
|
|
||||||
// Event responses.
|
// Event responses.
|
||||||
if (is_user_admin($config['id_user'])) {
|
if (is_user_admin($config['id_user'])) {
|
||||||
$sql_event_resp = "SELECT id, name FROM tevent_response WHERE type LIKE 'command'";
|
$sql_event_resp = "SELECT id, name FROM tevent_response WHERE type LIKE 'command'";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user