Merge branch 'ent-10081-14644-meta-homescreen-no-aparece-en-edit-my-user-pero-si-en-configuracion-de-usuario' into 'develop'
Ent 10081 14644 meta homescreen no aparece en edit my user pero si en configuracion de usuario See merge request artica/pandorafms!5809
This commit is contained in:
commit
be807d572d
|
@ -54,6 +54,18 @@ if ($enterprise_include === true) {
|
|||
enterprise_include_once('meta/include/functions_users_meta.php');
|
||||
}
|
||||
|
||||
$homeScreenValues = [
|
||||
HOME_SCREEN_DEFAULT => __('Default'),
|
||||
HOME_SCREEN_VISUAL_CONSOLE => __('Visual console'),
|
||||
HOME_SCREEN_EVENT_LIST => __('Event list'),
|
||||
HOME_SCREEN_GROUP_VIEW => __('Group view'),
|
||||
HOME_SCREEN_TACTICAL_VIEW => __('Tactical view'),
|
||||
HOME_SCREEN_ALERT_DETAIL => __('Alert detail'),
|
||||
HOME_SCREEN_EXTERNAL_LINK => __('External link'),
|
||||
HOME_SCREEN_OTHER => __('Other'),
|
||||
HOME_SCREEN_DASHBOARD => __('Dashboard'),
|
||||
];
|
||||
|
||||
// This defines the working user. Beware with this, old code get confusses
|
||||
// and operates with current logged user (dangerous).
|
||||
$id = get_parameter('id', get_parameter('id_user', ''));
|
||||
|
@ -414,6 +426,8 @@ if ($create_user === true) {
|
|||
$values['data_section'] = get_parameter('data_section');
|
||||
}
|
||||
|
||||
$values['section'] = $homeScreenValues[$values['section']];
|
||||
|
||||
if (enterprise_installed() === true) {
|
||||
$values['force_change_pass'] = 1;
|
||||
$values['last_pass_change'] = date('Y/m/d H:i:s', get_system_time());
|
||||
|
@ -696,6 +710,8 @@ if ($update_user) {
|
|||
$values['data_section'] = get_parameter('data_section');
|
||||
}
|
||||
|
||||
$values['section'] = $homeScreenValues[$values['section']];
|
||||
|
||||
if (enterprise_installed() === true && is_metaconsole() === true) {
|
||||
$values['metaconsole_access'] = get_parameter('metaconsole_access');
|
||||
$values['metaconsole_agents_manager'] = get_parameter('metaconsole_agents_manager', '0');
|
||||
|
|
|
@ -608,7 +608,7 @@ $userManagementTable->data['fields_blocksize_eventfilter'][1] = html_print_selec
|
|||
false,
|
||||
false
|
||||
);
|
||||
if (is_metaconsole() === false) {
|
||||
|
||||
// Home screen table.
|
||||
$homeScreenTable = new stdClass();
|
||||
$homeScreenTable->class = 'w100p full_section';
|
||||
|
@ -624,7 +624,7 @@ if (is_metaconsole() === false) {
|
|||
$homeScreenTable->data['fields_homescreen'][0] = html_print_select(
|
||||
$homeScreenValues,
|
||||
'section',
|
||||
io_safe_output($user_info['section']),
|
||||
array_search($user_info['section'], $homeScreenValues),
|
||||
'show_data_section();',
|
||||
'',
|
||||
-1,
|
||||
|
@ -642,7 +642,7 @@ if (is_metaconsole() === false) {
|
|||
|
||||
$userManagementTable->rowclass['homescreen_table'] = 'w100p';
|
||||
$userManagementTable->data['homescreen_table'] = html_print_table($homeScreenTable, true);
|
||||
}
|
||||
|
||||
|
||||
if (is_metaconsole() === true && users_is_admin() === true) {
|
||||
$userManagementTable->rowclass['search_custom1_looknfeel'] = 'field_half_width';
|
||||
|
|
|
@ -462,7 +462,7 @@ $usr_groups = (users_get_groups($config['id_user'], 'AR', $display_all_group));
|
|||
$id_usr = $config['id_user'];
|
||||
|
||||
$skin = '';
|
||||
if (!$meta) {
|
||||
|
||||
$home_screen = '<div class="label_select"><p class="edit_user_labels">'.__('Home screen').ui_print_help_tip(__('User can customize the home page. By default, will display \'Agent Detail\'. Example: Select \'Other\' and type index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=1 to show agent detail view'), true).'</p>';
|
||||
$values = [
|
||||
'Default' => __('Default'),
|
||||
|
@ -520,19 +520,7 @@ if (!$meta) {
|
|||
$skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'</div>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$home_screen = '';
|
||||
// User only can change skins if has more than one group.
|
||||
if (function_exists('skins_print_select')) {
|
||||
if (count($usr_groups) > 1) {
|
||||
$skin = '<div class="label_select"><p class="edit_user_labels">'.__('Theme').ui_print_help_tip(
|
||||
__('This change will only apply to nodes'),
|
||||
true
|
||||
).'</p>';
|
||||
$skin .= skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true).'</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$timezone = '<div class="label_select"><p class="edit_user_labels">'.__('Timezone').ui_print_help_tip(__('The timezone must be that of the associated server.'), true).'</p>';
|
||||
$timezone .= html_print_timezone_select('timezone', $user_info['timezone']).'</div>';
|
||||
|
|
Loading…
Reference in New Issue