From 78f5d79638a4920256eac22e944c44bb3b757155 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Thu, 29 Sep 2016 15:02:12 +0200 Subject: [PATCH] fix visual errors --- pandora_console/general/alert_enterprise.php | 12 ++++++-- .../godmode/setup/setup_visuals.php | 30 ++++++++++++++++--- pandora_console/include/functions_config.php | 23 ++++---------- pandora_console/include/functions_html.php | 2 +- pandora_console/include/functions_ui.php | 2 +- pandora_console/include/styles/pandora.css | 4 --- 6 files changed, 43 insertions(+), 30 deletions(-) diff --git a/pandora_console/general/alert_enterprise.php b/pandora_console/general/alert_enterprise.php index 47a5a4b356..9ec5be9b2e 100644 --- a/pandora_console/general/alert_enterprise.php +++ b/pandora_console/general/alert_enterprise.php @@ -16,8 +16,16 @@ $tipo = $_GET['message']; echo "
- -Community version +"; + +if(!enterprise_installed()){ + echo "Community version"; +} +else{ + echo "Enterprise version"; +} + +echo "
diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index c814975e52..3d2c848f8f 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -163,17 +163,39 @@ $table_styles->data[$row][1] .= " " . $row++; $table_styles->data[$row][0] = __('Custom logo') . ui_print_help_icon("custom_logo", true); + +if(enterprise_installed()){ + $table_styles->data[$row][1] = html_print_select( +list_files('enterprise/images/custom_logo', "png", 1, 0), 'custom_logo', +$config["custom_logo"], '', '', '',true,false,true,'',$open,'width:240px'); + +} +else{ + + $table_styles->data[$row][1] = html_print_select( list_files('images/custom_logo', "png", 1, 0), 'custom_logo', $config["custom_logo"], '', '', '',true,false,true,'',$open,'width:240px'); -$table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_logo_preview', $open, '', 'class="sub camera"', true,false,$open,'visualmodal'); +} + + $table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_logo_preview', $open, '', 'class="sub camera"', true,false,$open,'visualmodal'); $row++; -$table_styles->data[$row][0] = __('Custom logo in login') . ui_print_help_icon("custom_logo", true); +$table_styles->data[$row][0] = __('Custom logo in login') . ui_print_help_icon("custom_logo_login", true); + +if(enterprise_installed()){ $table_styles->data[$row][1] = html_print_select( - list_files('images/custom_logo_login', "png", 1, 0), 'custom_logo_login', + list_files('enterprise/images/custom_logo_login', "png", 1, 0), 'custom_logo_login', $config["custom_logo_login"], '', '', '',true,false,true,'',$open,'width:240px'); -$table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_logo_preview', $open, '', 'class="sub camera"', true,false,$open,'visualmodal'); +} +else{ + $table_styles->data[$row][1] = html_print_select( + list_files('images/custom_logo_login', "png", 1, 0), 'custom_logo_login', + $config["custom_logo_login"], '', '', '',true,false,true,'',$open,'width:240px'); + +} + + $table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_logo_login_preview', $open, '', 'class="sub camera"', true,false,$open,'visualmodal'); $row++; diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index d4d315daf7..700f516930 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -462,22 +462,12 @@ function config_update_config () { if (!config_update_value ('flash_charts', (bool) get_parameter ('flash_charts'))) $error_update[] = __('Interactive charts'); - if(!enterprise_installed()){ - $open=true; - } - - if(!$open){ + if (!config_update_value ('custom_logo', (string) get_parameter ('custom_logo'))) $error_update[] = __('Custom logo'); if (!config_update_value ('custom_logo_login', (string) get_parameter ('custom_logo_login'))) $error_update[] = __('Custom logo login'); - - - - } - - - + if (!config_update_value ('login_background', (string) get_parameter ('login_background'))) @@ -1053,19 +1043,16 @@ function config_process_config () { config_update_value ('fixed_menu', false); } - if(!$open){ - + if (!isset ($config["custom_logo"])) { - config_update_value ('custom_logo', 'pandora_logo_head.png'); + config_update_value ('custom_logo', 'pandora_logo_head_3.png'); } if (!isset ($config["custom_logo_login"])) { - config_update_value ('custom_logo_login', 'pandora_logo.png'); + config_update_value ('custom_logo_login', 'login_logo.png'); } -} - if (!isset ($config['history_db_enabled'])) { config_update_value ( 'history_db_enabled', false); } diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index e738c01355..5fb933e85f 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -543,7 +543,7 @@ function html_print_select ($fields, $name, $selected = '', $script = '', } $output .= ""; - if ($modal){ + if ($modal && !enterprise_installed()){ $output .= "
"; diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index a32aed3aac..d7d0f5cc98 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2417,7 +2417,7 @@ function ui_print_page_header ($title, $icon = "", $return = false, $help = "", $buffer .= '