#10563 Move menu item Links from Management to Operation. Add button in setup to global disable the Feedback functionality
This commit is contained in:
parent
0e8a74a4b8
commit
c26db22fa5
|
@ -352,7 +352,10 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||
}
|
||||
|
||||
// Button for feedback pandora.
|
||||
if (enterprise_installed()) {
|
||||
if (enterprise_installed() && ( (!isset($config['activate_feedback'])
|
||||
|| (isset($config['activate_feedback'])
|
||||
&& $config['activate_feedback'] === true )) )
|
||||
) {
|
||||
$header_feedback = '<div id="feedback-icon-header">';
|
||||
$header_feedback .= '<div id="modal-feedback-form" class="invisible"></div>';
|
||||
$header_feedback .= '<div id="msg-header" class="invisible"></div>';
|
||||
|
|
|
@ -546,21 +546,23 @@ if ($access_console_node === true) {
|
|||
}
|
||||
}
|
||||
|
||||
$menu_godmode['links']['text'] = __('Links');
|
||||
$menu_godmode['links']['sec2'] = '';
|
||||
$menu_godmode['links']['id'] = 'god-links';
|
||||
/*
|
||||
$menu_godmode['links']['text'] = __('Links');
|
||||
$menu_godmode['links']['sec2'] = '';
|
||||
$menu_godmode['links']['id'] = 'god-links';
|
||||
|
||||
$sub = [];
|
||||
$rows = db_get_all_rows_in_table('tlink', 'name');
|
||||
foreach ($rows as $row) {
|
||||
$sub = [];
|
||||
$rows = db_get_all_rows_in_table('tlink', 'name');
|
||||
foreach ($rows as $row) {
|
||||
// Audit //meter en extensiones.
|
||||
$sub[$row['link']]['text'] = $row['name'];
|
||||
$sub[$row['link']]['id'] = $row['name'];
|
||||
$sub[$row['link']]['type'] = 'direct';
|
||||
$sub[$row['link']]['subtype'] = 'new_blank';
|
||||
}
|
||||
}
|
||||
|
||||
$menu_godmode['links']['sub'] = $sub;
|
||||
$menu_godmode['links']['sub'] = $sub;
|
||||
*/
|
||||
}
|
||||
|
||||
// Warp Manager.
|
||||
|
|
|
@ -429,6 +429,19 @@ $table->data[$i++][] = html_print_label_input_block(
|
|||
)
|
||||
);
|
||||
|
||||
$table->data[$i++][] = html_print_label_input_block(
|
||||
__('Enable Feedback'),
|
||||
html_print_checkbox_switch_extended(
|
||||
'activate_feedback',
|
||||
1,
|
||||
$config['activate_feedback'],
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->colspan[$i][] = 2;
|
||||
$table->data[$i++][] = html_print_label_input_block(
|
||||
__('Timezone setup'),
|
||||
|
|
|
@ -264,6 +264,10 @@ function config_update_config()
|
|||
$error_update[] = __('Enable Sflow');
|
||||
}
|
||||
|
||||
if (config_update_value('activate_feedback', (bool) get_parameter('activate_feedback'), true) === false) {
|
||||
$error_update[] = __('Enable Feedback');
|
||||
}
|
||||
|
||||
if (config_update_value('general_network_path', get_parameter('general_network_path'), true) === false) {
|
||||
$error_update[] = __('General network path');
|
||||
} else {
|
||||
|
@ -3330,6 +3334,10 @@ function config_process_config()
|
|||
config_update_value('autoupdate', 1);
|
||||
}
|
||||
|
||||
if (!isset($config['activate_feedback'])) {
|
||||
config_update_value('activate_feedback', 1);
|
||||
}
|
||||
|
||||
if (!isset($config['api_password'])) {
|
||||
config_update_value('api_password', '');
|
||||
}
|
||||
|
|
|
@ -628,6 +628,27 @@ if ($favorite_menu !== false) {
|
|||
}
|
||||
|
||||
|
||||
// Links.
|
||||
$rows = db_get_all_rows_in_table('tlink', 'name');
|
||||
// $rows = [];
|
||||
if (!empty($rows)) {
|
||||
$menu_operation['links']['text'] = __('Links');
|
||||
$menu_operation['links']['sec2'] = '';
|
||||
$menu_operation['links']['id'] = 'god-links';
|
||||
|
||||
$sub = [];
|
||||
foreach ($rows as $row) {
|
||||
// Audit //meter en extensiones.
|
||||
$sub[$row['link']]['text'] = $row['name'];
|
||||
$sub[$row['link']]['id'] = $row['name'];
|
||||
$sub[$row['link']]['type'] = 'direct';
|
||||
$sub[$row['link']]['subtype'] = 'new_blank';
|
||||
}
|
||||
|
||||
$menu_operation['links']['sub'] = $sub;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Workspace.
|
||||
|
@ -785,6 +806,8 @@ if ($access_console_node === true) {
|
|||
// ~ }
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Save operation menu array to use in operation/extensions.php view
|
||||
$operation_menu_array = $menu_operation;
|
||||
|
||||
|
|
Loading…
Reference in New Issue