From c783d677cd61578a7431af15e238eb0a32bcbfc6 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 25 Jun 2013 11:20:13 +0000 Subject: [PATCH] 2013-06-25 Miguel de Dios * operation/users/user_edit.php: merge the code for made more easy the merges from the branch. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8398 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/operation/users/user_edit.php | 16 ++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 195b702f60..537324f502 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2013-06-25 Miguel de Dios + + * operation/users/user_edit.php: merge the code for made more + easy the merges from the branch. + 2013-06-25 Miguel de Dios * extensions/vnc_view.php: added the changes from the branch of diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index b0d8a4b96a..77bca6a470 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -25,7 +25,7 @@ include_once ($config['homedir'] . '/include/functions_groups.php'); include_once ($config['homedir'] . '/include/functions_visual_map.php'); $meta = false; -if(enterprise_installed() && defined("METACONSOLE")) { +if (enterprise_installed() && defined("METACONSOLE")) { $meta = true; } @@ -102,7 +102,7 @@ if (isset ($_GET["modified"]) && !$view_mode) { $upd_info["id_skin"] = get_parameter ("skin", $user_info["id_skin"]); $upd_info["block_size"] = get_parameter ("block_size", $config["block_size"]); $default_block_size = get_parameter ("default_block_size", 0); - if($default_block_size) { + if ($default_block_size) { $upd_info["block_size"] = 0; } @@ -116,6 +116,7 @@ if (isset ($_GET["modified"]) && !$view_mode) { $is_admin = db_get_value('is_admin', 'tusuario', 'id_user', $id); $section = io_safe_output($upd_info["section"]); + if (($section == 'Event list') || ($section == 'Group view') || ($section == 'Alert detail') || ($section == 'Tactical view') || ($section == 'Default')) { $upd_info["data_section"] = ''; } @@ -126,7 +127,7 @@ if (isset ($_GET["modified"]) && !$view_mode) { $upd_info["data_section"] = $visual_console; } - if ( !empty ($password_new)) { + if (!empty ($password_new)) { if ($config["user_can_update_password"] && $password_confirm == $password_new) { if ((!$is_admin || $config['enable_pass_policy_admin']) && $config['enable_pass_policy']) { $pass_ok = login_validate_pass($password_new, $id, true); @@ -259,6 +260,7 @@ $data[1] .= '
' . html_print_select($values, 'flash_charts', $user_info["flas $data[2] = __('Language'); $data[2] .= '
' . html_print_select_from_sql ('SELECT id_language, name FROM tlanguage', 'language', $user_info["language"], '', __('Default'), 'default', true); + $table->rowclass[] = ''; $table->rowstyle[] = 'font-weight: bold;'; $table->data[] = $data; @@ -351,7 +353,7 @@ if ($result === false) { foreach ($result as $profile) { $data[0] = ''.profile_get_name ($profile["id_perfil"]).''; $data[1] = ui_print_group_icon ($profile["id_grupo"], true).' '; - + $tags_ids = explode(',',$profile["tags"]); $tags = tags_get_tags($tags_ids); @@ -379,18 +381,20 @@ $(document).ready (function () { }); function check_default_block_size() { - if($("#checkbox-default_block_size").is(':checked')) { + if ($("#checkbox-default_block_size").is(':checked')) { $("#text-block_size").attr('disabled', true); } else { $("#text-block_size").removeAttr('disabled'); } } + show_data_section(); }); function show_data_section () { - section=$("#section").val(); + section = $("#section").val(); + switch (section) { case : $("#text-data_section").css("display", "none");