Fixed errors and corrected style

Former-commit-id: 645c76e98d2ba8b417048722001193bc3197bb0a
This commit is contained in:
Luis Calvo 2019-05-13 17:28:23 +02:00
parent 14717a6c6d
commit ce34adb9d8
4 changed files with 15 additions and 18 deletions

View File

@ -292,7 +292,7 @@ if ($update_user) {
$values['default_event_filter'] = (int) get_parameter('default_event_filter');
$values['default_custom_view'] = (int) get_parameter('default_custom_view');
$values['ehorus_user_login_user'] = get_parameter('ehorus_user_login_user', $user_info['ehorus_user_login_user']);
$values['ehorus_user_login_pass'] = get_parameter('ehorus_user_login_pass', $user_info['ehorus_user_login_pass']);
$values['ehorus_user_login_pass'] = get_parameter(io_input_password((string) get_parameter('ehorus_user_login_pass', $user_info['ehorus_user_login_pass'])));
$dashboard = get_parameter('dashboard', '');
$visual_console = get_parameter('visual_console', '');

View File

@ -4862,7 +4862,8 @@ input:checked + .p-slider:before {
}
.user_edit_first_row,
.user_edit_second_row {
.user_edit_second_row,
.user_edit_third_row {
margin-bottom: 20px;
}

View File

@ -1263,11 +1263,9 @@ if ($config['ehorus_enabled'] && !empty($config['ehorus_custom_field'])
&& (check_acl_one_of_groups(
$config['id_user'],
$all_groups,
'
'
'AW'
) || is_user_admin($config['id_user']))
) {
$user_info;
$user_info = users_get_user_by_id($config['id_user']);
if ($config['ehorus_user_login'] && !$user_info['ehorus_user_login_user'] && !$user_info['ehorus_user_login_pass']) {
// If ehorus user configuration is enabled, and no password provided, do nothing.

View File

@ -32,7 +32,6 @@ global $config;
// Load the header.
require $config['homedir'].'/operation/users/user_edit_header.php';
hd($_POST);
if (!is_metaconsole()) {
date_default_timezone_set('UTC');
include 'include/javascript/timezonepicker/includes/parser.inc';
@ -618,17 +617,18 @@ if (!is_metaconsole()) {
<div class="edit_user_comments">'.$comments.'</div>
</div>
</div>';
if ($config['ehorus_enabled'] && $config['ehorus_user_login']) {
// eHorus user login
// eHorus user remote login
$table_remote = new StdClass();
$table_remote->data = [];
$table_remote->width = '100%';
$table_remote->styleTable = 'margin-bottom: 10px;';
$table_remote->id = 'ehorus_user_login';
$table_remote->class = 'ehorus_user_login white_box';
$table_remote->id = 'ehorus-remote-setup';
$table_remote->class = 'white_box';
$table_remote->size['name'] = '30%';
$table_remote->style['name'] = 'font-weight: bold';
// User.
$row = [];
$row['name'] = __('User');
@ -648,21 +648,18 @@ if ($config['ehorus_enabled'] && $config['ehorus_user_login']) {
$row = [];
$row['name'] = __('Test');
$row['control'] = html_print_button(__('Start'), 'test-ehorus', false, 'ehorus_connection_test(&quot;'.$ehorus_host.'&quot;,'.$ehorus_port.')', 'class="sub next"', true);
$row['control'] .= '<span id="test-ehorus-spinner" style="display:none;">&nbsp;'.html_print_image('images/spinner.gif', true).'</span>';
$row['control'] .= '<span id="test-ehorus-success" style="display:none;">&nbsp;'.html_print_image('images/status_sets/default/severity_normal.png', true).'</span>';
$row['control'] .= '<span id="test-ehorus-failure" style="display:none;">&nbsp;'.html_print_image('images/status_sets/default/severity_critical.png', true).'</span>';
$row['control'] .= '&nbsp;<span id="test-ehorus-spinner" style="display:none;">&nbsp;'.html_print_image('images/spinner.gif', true).'</span>';
$row['control'] .= '&nbsp;<span id="test-ehorus-success" style="display:none;">&nbsp;'.html_print_image('images/status_sets/default/severity_normal.png', true).'</span>';
$row['control'] .= '&nbsp;<span id="test-ehorus-failure" style="display:none;">&nbsp;'.html_print_image('images/status_sets/default/severity_critical.png', true).'</span>';
$row['control'] .= '<span id="test-ehorus-message" style="display:none;"></span>';
$table_remote->data['ehorus_test'] = $row;
echo '<div class="ehorus_user_acces white_box">';
html_print_input_hidden('update_config', 1);
html_print_table($table_remote);
echo '</div>';
}
echo '<div class="edit_user_button">';
echo '<div class="edit_user_button">';
if (!$config['user_can_update_info']) {
echo '<i>'.__('You can not change your user info under the current authentication scheme').'</i>';
} else {
@ -671,6 +668,7 @@ if (!$config['user_can_update_info']) {
}
echo '</div>';
echo '</form>';
echo '<div id="edit_user_profiles" class="white_box">';
if (!defined('METACONSOLE')) {