diff --git a/pandora_console/godmode/users/configure_profile.php b/pandora_console/godmode/users/configure_profile.php
index 88eef6789e..4552537665 100644
--- a/pandora_console/godmode/users/configure_profile.php
+++ b/pandora_console/godmode/users/configure_profile.php
@@ -33,7 +33,7 @@ $tab = get_parameter('tab', 'profile');
$pure = get_parameter('pure', 0);
// Header
-if (!defined('METACONSOLE')) {
+if (!is_metaconsole()) {
$buttons = array(
'user' => array(
'active' => false,
@@ -222,7 +222,7 @@ if ($id_profile || $new_profile) {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
- if (defined("METACONSOLE")) {
+ if (is_metaconsole()) {
$table->width = '100%';
$table->class = 'databox data';
if ($id_profile)
@@ -242,20 +242,7 @@ if ($id_profile || $new_profile) {
$row['name'] = __('Profile name');
$row['input'] = html_print_input_text ('name', $name, '', 30, 60, true);
$table->data['name'] = $row;
-
- // Incidents
- $row = array();
- $row['name'] = __('View incidents');
- $row['input'] = html_print_checkbox ('incident_view', 1, $incident_view, true);
- $table->data['IR'] = $row;
- $row = array();
- $row['name'] = __('Edit incidents');
- $row['input'] = html_print_checkbox ('incident_edit', 1, $incident_edit, true);
- $table->data['IW'] = $row;
- $row = array();
- $row['name'] = __('Manage incidents');
- $row['input'] = html_print_checkbox ('incident_management', 1, $incident_management, true);
- $table->data['IM'] = $row;
+ $table->data[] = '
';
// Agents
$row = array();
@@ -264,12 +251,13 @@ if ($id_profile || $new_profile) {
$table->data['AR'] = $row;
$row = array();
$row['name'] = __('Edit agents');
- $row['input'] = html_print_checkbox ('agent_edit', 1, $agent_edit, true);
+ $row['input'] = html_print_checkbox ('agent_edit', 1, $agent_edit, true, false, 'autoclick_profile_users(\'agent_view\', \'false\')');
$table->data['AW'] = $row;
$row = array();
$row['name'] = __('Disable agents');
- $row['input'] = html_print_checkbox ('agent_disable', 1, $agent_disable, true);
+ $row['input'] = html_print_checkbox ('agent_disable', 1, $agent_disable, true, false, 'autoclick_profile_users(\'agent_view\', \'agent_edit\')');
$table->data['AD'] = $row;
+ $table->data[] = '
';
// Alerts
$row = array();
@@ -278,20 +266,9 @@ if ($id_profile || $new_profile) {
$table->data['LW'] = $row;
$row = array();
$row['name'] = __('Manage alerts');
- $row['input'] = html_print_checkbox ('alert_management', 1, $alert_management, true);
+ $row['input'] = html_print_checkbox ('alert_management', 1, $alert_management, true, false, 'autoclick_profile_users(\'alert_edit\', \'false\')');
$table->data['LM'] = $row;
-
- // Users
- $row = array();
- $row['name'] = __('Manage users');
- $row['input'] = html_print_checkbox ('user_management', 1, $user_management, true);
- $table->data['UM'] = $row;
-
- // DB
- $row = array();
- $row['name'] = __('Manage database');
- $row['input'] = html_print_checkbox ('db_management', 1, $db_management, true);
- $table->data['DM'] = $row;
+ $table->data[] = '
';
// Events
$row = array();
@@ -300,13 +277,14 @@ if ($id_profile || $new_profile) {
$table->data['ER'] = $row;
$row = array();
$row['name'] = __('Edit events');
- $row['input'] = html_print_checkbox ('event_edit', 1, $event_edit, true);
+ $row['input'] = html_print_checkbox ('event_edit', 1, $event_edit, true, false, 'autoclick_profile_users(\'event_view\', \'false\')');
$table->data['EW'] = $row;
$row = array();
$row['name'] = __('Manage events');
- $row['input'] = html_print_checkbox ('event_management', 1, $event_management, true);
+ $row['input'] = html_print_checkbox ('event_management', 1, $event_management, true, false, 'autoclick_profile_users(\'event_view\', \'event_edit\')');
$table->data['EM'] = $row;
-
+ $table->data[] = '
';
+
// Reports
$row = array();
$row['name'] = __('View reports');
@@ -314,12 +292,13 @@ if ($id_profile || $new_profile) {
$table->data['RR'] = $row;
$row = array();
$row['name'] = __('Edit reports');
- $row['input'] = html_print_checkbox ('report_edit', 1, $report_edit, true);
+ $row['input'] = html_print_checkbox ('report_edit', 1, $report_edit, true, false, 'autoclick_profile_users(\'report_view\', \'false\')');
$table->data['RW'] = $row;
$row = array();
$row['name'] = __('Manage reports');
- $row['input'] = html_print_checkbox ('report_management', 1, $report_management, true);
+ $row['input'] = html_print_checkbox ('report_management', 1, $report_management, true, false, 'autoclick_profile_users(\'report_view\', \'report_edit\')');
$table->data['RM'] = $row;
+ $table->data[] = '
';
// Network maps
$row = array();
@@ -328,12 +307,13 @@ if ($id_profile || $new_profile) {
$table->data['MR'] = $row;
$row = array();
$row['name'] = __('Edit network maps');
- $row['input'] = html_print_checkbox ('map_edit', 1, $map_edit, true);
+ $row['input'] = html_print_checkbox ('map_edit', 1, $map_edit, true, false, 'autoclick_profile_users(\'map_view\', \'false\')');
$table->data['MW'] = $row;
$row = array();
$row['name'] = __('Manage network maps');
- $row['input'] = html_print_checkbox ('map_management', 1, $map_management, true);
+ $row['input'] = html_print_checkbox ('map_management', 1, $map_management, true, false, 'autoclick_profile_users(\'map_view\', \'map_edit\')');
$table->data['MM'] = $row;
+ $table->data[] = '
';
// Visual console
$row = array();
@@ -342,18 +322,49 @@ if ($id_profile || $new_profile) {
$table->data['VR'] = $row;
$row = array();
$row['name'] = __('Edit visual console');
- $row['input'] = html_print_checkbox ('vconsole_edit', 1, $vconsole_edit, true);
+ $row['input'] = html_print_checkbox ('vconsole_edit', 1, $vconsole_edit, true, false, 'autoclick_profile_users(\'vconsole_view\', \'false\')');
$table->data['VW'] = $row;
$row = array();
$row['name'] = __('Manage visual console');
- $row['input'] = html_print_checkbox ('vconsole_management', 1, $vconsole_management, true);
+ $row['input'] = html_print_checkbox ('vconsole_management', 1, $vconsole_management, true, false, 'autoclick_profile_users(\'vconsole_view\', \'vconsole_edit\')');
$table->data['VM'] = $row;
+ $table->data[] = '
';
+
+ // Incidents
+ $row = array();
+ $row['name'] = __('View incidents');
+ $row['input'] = html_print_checkbox ('incident_view', 1, $incident_view, true);
+ $table->data['IR'] = $row;
+ $row = array();
+ $row['name'] = __('Edit incidents');
+ $row['input'] = html_print_checkbox ('incident_edit', 1, $incident_edit, true, false, 'autoclick_profile_users(\'incident_view\', \'false\')');
+ $table->data['IW'] = $row;
+ $row = array();
+ $row['name'] = __('Manage incidents');
+ $row['input'] = html_print_checkbox ('incident_management', 1, $incident_management, true, false, 'autoclick_profile_users(\'incident_view\', \'incident_edit\');');
+ $table->data['IM'] = $row;
+ $table->data[] = '
';
+
+ // Users
+ $row = array();
+ $row['name'] = __('Manage users');
+ $row['input'] = html_print_checkbox ('user_management', 1, $user_management, true);
+ $table->data['UM'] = $row;
+ $table->data[] = '
';
+
+ // DB
+ $row = array();
+ $row['name'] = __('Manage database');
+ $row['input'] = html_print_checkbox ('db_management', 1, $db_management, true);
+ $table->data['DM'] = $row;
+ $table->data[] = '
';
// Pandora
$row = array();
$row['name'] = __('Pandora management');
$row['input'] = html_print_checkbox ('pandora_management', 1, $pandora_management, true);
$table->data['PM'] = $row;
+ $table->data[] = '
';
echo '