diff --git a/pandora_console/godmode/users/configure_profile.php b/pandora_console/godmode/users/configure_profile.php index 82af2e5e8e..7ce1a25da1 100644 --- a/pandora_console/godmode/users/configure_profile.php +++ b/pandora_console/godmode/users/configure_profile.php @@ -50,11 +50,11 @@ if (is_metaconsole() === false) { 'user' => [ 'active' => false, 'text' => ''.html_print_image( - 'images/gm_users.png', + 'images/user.svg', true, [ 'title' => __('User management'), - 'class' => 'invert_filter', + 'class' => 'invert_filter main_menu_icon', ] ).'', ], @@ -77,7 +77,7 @@ if (is_metaconsole() === false) { ui_print_standard_header( __('Edit profile %s', $profile['name']), - 'images/gm_users.png', + 'images/user.svg', false, 'configure_profiles_tab', true, @@ -411,18 +411,30 @@ if ($id_profile || $new_profile) { html_print_table($table); - echo '
'; + $actionButtons[] = html_print_go_back_button( + ui_get_full_url('index.php?sec=gusuarios&sec2=godmode/users/profile_list&tab=profile&pure=0'), + ['button_class' => ''], + true + ); + + html_print_action_buttons( + implode('', $actionButtons), + ['type' => 'form_action'] + ); + + echo ''; } enterprise_hook('close_meta_frame'); diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index fdfcfd1b3c..2bf7a48960 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -238,11 +238,11 @@ if (is_metaconsole() === true) { 'user' => [ 'active' => false, 'text' => ''.html_print_image( - 'images/user.png', + 'images/user.svg', true, [ 'title' => __('User management'), - 'class' => 'invert_filter', + 'class' => 'invert_filter main_menu_icon', ] ).'', ], diff --git a/pandora_console/godmode/users/profile_list.php b/pandora_console/godmode/users/profile_list.php index c06e78f3aa..8b9984bf31 100644 --- a/pandora_console/godmode/users/profile_list.php +++ b/pandora_console/godmode/users/profile_list.php @@ -57,11 +57,11 @@ if (is_metaconsole() === false) { 'user' => [ 'active' => false, 'text' => ''.html_print_image( - 'images/gm_users.png', + 'images/user.svg', true, [ 'title' => __('User management'), - 'class' => 'invert_filter', + 'class' => 'invert_filter main_menu_user', ] ).'', ], @@ -72,7 +72,7 @@ if (is_metaconsole() === false) { true, [ 'title' => __('Profile management'), - 'class' => 'invert_filter', + 'class' => 'invert_filter main_menu_user', ] ).'', ], @@ -83,7 +83,7 @@ if (is_metaconsole() === false) { // Header. ui_print_standard_header( __('User Profile management'), - 'images/gm_users.png', + 'images/user.svg', false, 'profile_tab', false, @@ -333,29 +333,30 @@ $table->align = []; $table->head['profiles'] = __('Profiles'); -$table->head['AR'] = 'AR'; -$table->head['AW'] = 'AW'; -$table->head['AD'] = 'AD'; -$table->head['LW'] = 'LW'; -$table->head['LM'] = 'LM'; -$table->head['UM'] = 'UM'; -$table->head['DM'] = 'DM'; -$table->head['ER'] = 'ER'; -$table->head['EW'] = 'EW'; -$table->head['EM'] = 'EM'; -$table->head['RR'] = 'RR'; -$table->head['RW'] = 'RW'; -$table->head['RM'] = 'RM'; -$table->head['MR'] = 'MR'; -$table->head['MW'] = 'MW'; -$table->head['MM'] = 'MM'; -$table->head['VR'] = 'VR'; -$table->head['VW'] = 'VW'; -$table->head['VM'] = 'VM'; -$table->head['NR'] = 'NR'; -$table->head['NW'] = 'NW'; -$table->head['NM'] = 'NM'; -$table->head['PM'] = 'PM'; +$table->head['AR'] = ''.'AR'.''; +$table->head['AW'] = ''.'AW'.''; +$table->head['AD'] = ''.'AD'.''; +$table->head['LW'] = ''.'LW'.''; +$table->head['LM'] = ''.'LM'.''; +$table->head['UM'] = ''.'UM'.''; +$table->head['DM'] = ''.'DM'.''; +$table->head['ER'] = ''.'ER'.''; +$table->head['EW'] = ''.'EW'.''; +$table->head['EM'] = ''.'EM'.''; +$table->head['RR'] = ''.'RR'.''; +$table->head['RW'] = ''.'RW'.''; +$table->head['RM'] = ''.'RM'.''; +$table->head['MR'] = ''.'MR'.''; +$table->head['MW'] = ''.'MW'.''; +$table->head['MM'] = ''.'MM'.''; +$table->head['VR'] = ''.'VR'.''; +$table->head['VW'] = ''.'VW'.''; +$table->head['VM'] = ''.'VM'.''; +$table->head['NR'] = ''.'NR'.''; +$table->head['NW'] = ''.'NW'.''; +$table->head['NM'] = ''.'NM'.''; +$table->head['PM'] = ''.'PM'.''; + if ($is_management_allowed === true) { $table->head['operations'] = ''.__('Op.').''; } diff --git a/pandora_console/godmode/users/user_list.php b/pandora_console/godmode/users/user_list.php index e5e620b19f..42c8b0d9c1 100644 --- a/pandora_console/godmode/users/user_list.php +++ b/pandora_console/godmode/users/user_list.php @@ -247,7 +247,7 @@ if (is_metaconsole() === true) { 'user' => [ 'active' => false, 'text' => ''.html_print_image( - 'images/gm_users.png', + 'images/user.svg', true, [ 'title' => __('User management'), @@ -272,7 +272,7 @@ if (is_metaconsole() === true) { 'user' => [ 'active' => false, 'text' => ''.html_print_image( - 'images/gm_users.png', + 'images/user.svg', true, [ 'title' => __('User management'), @@ -288,7 +288,7 @@ if (is_metaconsole() === true) { // Header. ui_print_standard_header( __('Users management'), - 'images/gm_users.png', + 'images/user.svg', false, '', false, diff --git a/pandora_console/godmode/users/user_management.php b/pandora_console/godmode/users/user_management.php index 2ab6069cac..d73da04b4d 100644 --- a/pandora_console/godmode/users/user_management.php +++ b/pandora_console/godmode/users/user_management.php @@ -129,7 +129,7 @@ if (is_metaconsole() === false) { $userManagementTable = new stdClass(); $userManagementTable->id = 'advanced'; $userManagementTable->width = '100%'; -$userManagementTable->class = 'w100p floating_form'; +$userManagementTable->class = 'principal_table floating_form white_box'; $userManagementTable->data = []; $userManagementTable->style = []; $userManagementTable->rowclass = []; @@ -138,9 +138,6 @@ $userManagementTable->colspan = []; $userManagementTable->rowspan = []; // Title for Profile information. -$userManagementTable->rowclass['title_profile_information'] = 'w100p'; -$userManagementTable->cellstyle['title_profile_information'][0] = 'width: 40px;'; -$userManagementTable->cellstyle['title_profile_information'][1] = 'width: 100%;'; $userManagementTable->data['title_profile_information'][0] = html_print_div( [ 'class' => 'section_table_title_line', @@ -234,6 +231,34 @@ $userManagementTable->data['fields_phone'][0] = html_print_input_text_extended( true ); +if (users_is_admin() === true) { + $globalProfileContent = []; + $globalProfileContent[] = ''.__('Administrator user').''; + $globalProfileContent[] = html_print_checkbox_switch( + 'is_admin', + 0, + $user_info['is_admin'], + true + ); + + $userManagementTable->rowclass['captions_fields_admin_user'] = 'field_half_width'; + $userManagementTable->data['captions_fields_admin_user'][0] = html_print_div( + [ + 'class' => 'margin-top-10', + 'style' => 'display: flex; flex-direction: row-reverse; align-items: center;', + 'content' => implode('', $globalProfileContent), + ], + true + ); +} else { + // Insert in the latest row this hidden input avoiding create empty rows. + $userManagementTable->data['fields_phone'][0] .= html_print_input_hidden( + 'is_admin_sent', + 0, + true + ); +} + // Password management. $passwordManageTable = new stdClass(); $passwordManageTable->class = 'table_section full_section'; @@ -301,15 +326,75 @@ if ($new_user === false) { ); } -// $userManagementTable->rowclass['captions_passwordManage'] = 'full_section pdd_t_10px'; -// $userManagementTable->rowclass['passwordManage_table'] = 'table_section full_section'; -// $userManagementTable->data['captions_passwordManage'][0] = __('Password management'); $userManagementTable->data['passwordManage_table'] = html_print_table($passwordManageTable, true); + +$userManagementTable->rowclass['captions_loginErrorUser'] = 'field_half_width w50p'; +$userManagementTable->cellclass['captions_loginErrorUser'][0] = 'wrap'; +$userManagementTable->cellclass['captions_loginErrorUser'][1] = 'wrap'; +$notLoginCheckContent = []; +$notLoginCheckContent[] = ''.__('Not Login').''; +$notLoginCheckContent[] = html_print_checkbox_switch( + 'not_login', + 1, + $user_info['not_login'], + true +); + +$userManagementTable->data['captions_loginErrorUser'][0] = html_print_div( + [ + 'class' => 'margin-top-10', + 'style' => 'display: flex; flex-direction: row-reverse; align-items: center;', + 'content' => implode('', $notLoginCheckContent), + ], + true +); +$userManagementTable->data['captions_loginErrorUser'][0] .= ui_print_input_placeholder( + __('The user with not login set only can access to API.'), + true +); + +$localUserCheckContent = []; +$localUserCheckContent[] = ''.__('Local User').''; +$localUserCheckContent[] = html_print_checkbox_switch( + 'local_user', + 1, + $user_info['local_user'], + true +); + +$userManagementTable->data['captions_loginErrorUser'][1] = html_print_div( + [ + 'class' => 'margin-top-10', + 'style' => 'display: flex; flex-direction: row-reverse; align-items: center;', + 'content' => implode('', $localUserCheckContent), + ], + true +); +$userManagementTable->data['captions_loginErrorUser'][1] .= ui_print_input_placeholder( + __('The user with local authentication enabled will always use local authentication.'), + true +); + +// Session time input. +$userManagementTable->rowclass['captions_userSessionTime'] = 'field_half_width'; +$userManagementTable->rowclass['fields_userSessionTime'] = 'field_half_width'; +$userManagementTable->cellclass['fields_userSessionTime'][0] = 'wrap'; +$userManagementTable->data['captions_userSessionTime'][0] = __('Session time'); +$userManagementTable->data['fields_userSessionTime'][0] = html_print_input_text( + 'session_time', + $user_info['session_time'], + '', + 5, + 5, + true +); +$userManagementTable->data['fields_userSessionTime'][0] .= ui_print_input_placeholder( + __('This is defined in minutes, If you wish a permanent session should putting -1 in this field.'), + true +); + // Title for Autorefresh. -$userManagementTable->rowclass['title_autorefresh'] = 'w100p'; -$userManagementTable->cellstyle['title_autorefresh'][0] = 'width: 40px;'; -$userManagementTable->cellstyle['title_autorefresh'][1] = 'width: 100%;'; $userManagementTable->data['title_autorefresh'][0] = html_print_div( [ 'class' => 'section_table_title_line', @@ -453,11 +538,8 @@ $userManagementTable->data['fields_autorefreshList'] = $autorefreshTable; $userManagementTable->rowclass['captions_autorefreshTime'] = 'field_half_width'; $userManagementTable->rowclass['fields_autorefreshTime'] = 'field_half_width'; +$userManagementTable->cellclass['fields_autorefreshTime'][0] = 'wrap'; $userManagementTable->data['captions_autorefreshTime'][0] = __('Time for autorefresh'); -$userManagementTable->data['captions_autorefreshTime'][0] .= ui_print_help_tip( - __('Interval of autorefresh of the elements, by default they are 30 seconds, needing to enable the autorefresh first'), - true -); $userManagementTable->data['fields_autorefreshTime'][0] = html_print_select( get_refresh_time_array(), 'time_autorefresh', @@ -469,11 +551,12 @@ $userManagementTable->data['fields_autorefreshTime'][0] = html_print_select( false, false ); +$userManagementTable->data['fields_autorefreshTime'][0] .= ui_print_input_placeholder( + __('Interval of autorefresh of the elements, by default they are 30 seconds, needing to enable the autorefresh first'), + true +); // Title for Language and Appearance. -$userManagementTable->rowclass['title_lookAndFeel'] = 'w100p'; -$userManagementTable->cellstyle['title_lookAndFeel'][0] = 'width: 40px;'; -$userManagementTable->cellstyle['title_lookAndFeel'][1] = 'width: 100%;'; $userManagementTable->data['title_lookAndFeel'][0] = html_print_div( [ 'class' => 'section_table_title_line', @@ -526,7 +609,7 @@ $userManagementTable->data['fields_blocksize_eventfilter'][1] = html_print_selec // Home screen table. $homeScreenTable = new stdClass(); -$homeScreenTable->class = 'w100p table_section'; +$homeScreenTable->class = 'w100p table_section full_section'; $homeScreenTable->id = 'home_screen_table'; $homeScreenTable->style = []; $homeScreenTable->rowclass = []; @@ -564,9 +647,10 @@ $userManagementTable->rowclass['captions_timezone'] = 'field_half_width'; $userManagementTable->rowclass['fields_timezone'] = 'field_half_width'; $userManagementTable->colspan['captions_timezone'][0] = 2; $userManagementTable->cellstyle['fields_timezone'][0] = 'align-self: baseline;'; +$userManagementTable->cellclass['fields_timezone'][0] = 'wrap'; $userManagementTable->data['captions_timezone'][0] = __('Time zone'); $userManagementTable->data['fields_timezone'][0] = html_print_timezone_select('timezone', $user_info['timezone']); -$userManagementTable->data['fields_timezone'][0] .= ui_print_help_tip( +$userManagementTable->data['fields_timezone'][0] .= ui_print_input_placeholder( __('The timezone must be that of the associated server.'), true ); @@ -580,9 +664,6 @@ $userManagementTable->data['fields_timezone'][1] = html_print_div( ); // Title for Language and Appearance. -$userManagementTable->rowclass['title_additionalSettings'] = 'w100p'; -$userManagementTable->cellstyle['title_additionalSettings'][0] = 'width: 40px;'; -$userManagementTable->cellstyle['title_additionalSettings'][1] = 'width: 100%;'; $userManagementTable->data['title_additionalSettings'][0] = html_print_div( [ 'class' => 'section_table_title_line', @@ -608,10 +689,6 @@ $userManagementTable->data['fields_addSettings'][0] = html_print_textarea( ); $userManagementTable->data['captions_addSettings'][1] = __('Login allowed IP list'); -$userManagementTable->data['captions_addSettings'][1] .= ui_print_help_tip( - __('Add the source IPs that will allow console access. Each IP must be separated only by comma. * allows all.'), - true -); $userManagementTable->data['fields_addSettings'][1] = html_print_div( [ 'class' => 'edit_user_allowed_ip', @@ -627,6 +704,11 @@ $userManagementTable->data['fields_addSettings'][1] = html_print_div( true ); +$userManagementTable->data['fields_addSettings'][1] .= ui_print_input_placeholder( + __('Add the source IPs that will allow console access. Each IP must be separated only by comma. * allows all.'), + true +); + $allowAllIpsContent = []; $allowAllIpsContent[] = ''.__('Allow all IPs').''; $allowAllIpsContent[] = html_print_div( @@ -650,50 +732,6 @@ $userManagementTable->data['fields_addSettings'][1] .= html_print_div( true ); -$userManagementTable->rowclass['captions_loginErrorUser'] = 'field_half_width'; -$userManagementTable->rowclass['fields_loginErrorUser'] = 'field_half_width'; -$userManagementTable->cellstyle['captions_loginErrorUser'][0] = 'width: 25%'; -$userManagementTable->cellstyle['captions_loginErrorUser'][1] = 'width: 25%'; -$userManagementTable->cellstyle['fields_loginErrorUser'][0] = 'width: 25%'; -$userManagementTable->cellstyle['fields_loginErrorUser'][1] = 'width: 25%'; -$userManagementTable->data['captions_loginErrorUser'][0] = __('Not Login'); -$userManagementTable->data['captions_loginErrorUser'][0] .= ui_print_help_tip( - __('The user with not login set only can access to API.'), - true -); -$userManagementTable->data['fields_loginErrorUser'][0] = html_print_checkbox_switch( - 'not_login', - 1, - $user_info['not_login'], - true -); - -$userManagementTable->data['captions_loginErrorUser'][1] = __('Local user'); -$userManagementTable->data['captions_loginErrorUser'][1] .= ui_print_help_tip( - __('The user with local authentication enabled will always use local authentication.'), - true -); -$userManagementTable->data['fields_loginErrorUser'][1] = html_print_checkbox_switch( - 'local_user', - 1, - $user_info['local_user'], - true -); - -$userManagementTable->data['captions_loginErrorUser'][2] = __('Session time'); -$userManagementTable->data['captions_loginErrorUser'][2] .= ui_print_help_tip( - __('This is defined in minutes, If you wish a permanent session should putting -1 in this field.'), - true -); -$userManagementTable->data['fields_loginErrorUser'][2] = html_print_input_text( - 'session_time', - $user_info['session_time'], - '', - 5, - 5, - true -); - html_print_table($userManagementTable); // User Profile definition table. diff --git a/pandora_console/include/functions_profile.php b/pandora_console/include/functions_profile.php index 221954dfd8..77061a25b3 100644 --- a/pandora_console/include/functions_profile.php +++ b/pandora_console/include/functions_profile.php @@ -197,7 +197,7 @@ function profile_print_profile_table($id, $json_profile=false, $return=false, $c $table->class = 'databox_tactical data'; $table->title = $title; } else { - echo ''.$title.'
'; } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 87e6b41108..6ebb9a9b69 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -5102,7 +5102,7 @@ input:checked + .p-slider:before { .white_box { background-color: #fff; border: 1px solid #e1e1e1; - border-radius: 0px 0px 5px 5px; + border-radius: 8px; } .white_box > div { @@ -5128,8 +5128,8 @@ input:checked + .p-slider:before { } #edit_user_profiles { - margin-top: 40px; - margin-bottom: 30px; + margin-top: 20px; + margin-bottom: 10px; } #edit_user_profiles table { @@ -10421,6 +10421,7 @@ button.ui-button.ui-widget.submit-cancel:active { table#simple tr td, table#advanced tr td, +table.principal_table tr td, .white_table_flex > table tr td, .table_section table tr td { display: flex; @@ -10432,6 +10433,7 @@ table#advanced tr td, table#simple > tbody > tr, table#advanced > tbody > tr, +table.principal_table > tbody > tr, .white_table_flex tr, .table_section table tr { display: flex; @@ -11105,3 +11107,9 @@ form#satellite_conf_edit > fieldset.full-column { flex: none; margin: 0 0 20px; } + +.input_sub_placeholder { + font-size: 8pt; + color: #8a96a6; + font-family: "Pandora-Regular"; +} diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css index 3009c7f139..ecb5c08ae3 100644 --- a/pandora_console/include/styles/tables.css +++ b/pandora_console/include/styles/tables.css @@ -482,9 +482,11 @@ a.pandora_pagination.current:hover { .section_table_title_line { flex: 1 1 auto; - height: 2px; + width: 14px; + border-radius: 15px; + height: 3px; background-color: #14524f; - margin-left: 10px; + margin-top: -4px; box-shadow: inset 1px 1px 1px 1px #1d7873; }