diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index 1552f2f57c..fd609143b9 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -1,17 +1,32 @@ '.__('User ID').''; $data[0] .= $jump.''.$id.''; $data[1] = ''.__('Full (display) name').''; -$data[1] .= $jump.''.html_print_input_text_extended('fullname', $user_info['fullname'], 'fullname', '', 20, 100, $view_mode, '', 'class="input"', true).''; +$data[1] .= $jump.''; +$data[1] .= html_print_input_text_extended( + 'fullname', + $user_info['fullname'], + 'fullname', + '', + 20, + 100, + $view_mode, + '', + 'class="input"', + true +).''; + // Show "Picture" (in future versions, why not, allow users to upload it's own avatar here. if (is_user_admin($id)) { $data[2] = html_print_image('images/people_1.png', true); @@ -368,7 +419,7 @@ if (!$meta) { - // User only can change skins if has more than one group + // User only can change skins if has more than one group. $data[1] = ''; if (function_exists('skins_print_select')) { if (count($usr_groups) > 1) { @@ -388,7 +439,7 @@ $table->rowclass[] = ''; $table->rowstyle[] = 'font-weight: bold;'; $table->data[] = $data; -// Double auth +// Double auth. $double_auth_enabled = (bool) db_get_value('id', 'tuser_double_auth', 'id_user', $config['id_user']); $data = []; $data[0] = ''.__('Double authentication').''; @@ -399,7 +450,7 @@ if ($double_auth_enabled) { $data[0] .= html_print_button(__('Show information'), 'show_info', false, 'javascript:show_double_auth_info();', '', true); } -// Dialog +// Dialog. $data[0] .= '
'; if (check_acl($config['id_user'], 0, 'ER')) { @@ -407,14 +458,13 @@ if (check_acl($config['id_user'], 0, 'ER')) { $data[1] .= $jump.''.html_print_select_from_sql( 'SELECT id_filter, id_name FROM tevent_filter', 'event_filter', - $user_info['id_filter'], + $user_info['default_event_filter'], '', __('None'), null, true ).''; -}//end if -else if (license_free()) { +} else if (license_free()) { $data[1] = __('Newsletter Subscribed').':'; if ($user_info['middlename']) { $data[1] .= $jump.''.__('Already subscribed to %s newsletter', get_product_name()).''; @@ -465,7 +515,8 @@ if (!isset($autorefresh_list)) { $autorefresh_list[0] = __('None'); } else { $aux = []; - for ($i = 0; $i < count($autorefresh_list); $i++) { + $count_autorefresh_list = count($autorefresh_list); + for ($i = 0; $i < $count_autorefresh_list; $i++) { $aux[$autorefresh_list[$i]] = $autorefresh_list_out[$autorefresh_list[$i]]; unset($autorefresh_list_out[$autorefresh_list[$i]]); $autorefresh_list[$i] = $aux; @@ -478,7 +529,8 @@ if (!isset($autorefresh_list)) { $autorefresh_list[0] = __('None'); } else { $aux = []; - for ($i = 0; $i < count($autorefresh_list); $i++) { + $count_autorefresh_list = count($autorefresh_list); + for ($i = 0; $i < $count_autorefresh_list; $i++) { $aux[$autorefresh_list[$i]] = $autorefresh_list_out[$autorefresh_list[$i]]; unset($autorefresh_list_out[$autorefresh_list[$i]]); $autorefresh_list[$i] = $aux; @@ -488,10 +540,39 @@ if (!isset($autorefresh_list)) { } } -$data[0] = _('Autorefresh').ui_print_help_tip(__('This will activate autorefresh in selected pages'), true); -$select_out = html_print_select($autorefresh_list_out, 'autorefresh_list_out[]', '', '', '', '', true, true, true, '', false, 'width:200px'); +$data[0] = _('Autorefresh').ui_print_help_tip( + __('This will activate autorefresh in selected pages'), + true +); +$select_out = html_print_select( + $autorefresh_list_out, + 'autorefresh_list_out[]', + '', + '', + '', + '', + true, + true, + true, + '', + false, + 'width:200px' +); $arrows = ' '; -$select_in = html_print_select($autorefresh_list, 'autorefresh_list[]', '', '', '', '', true, true, true, '', false, 'width:200px'); +$select_in = html_print_select( + $autorefresh_list, + 'autorefresh_list[]', + '', + '', + '', + '', + true, + true, + true, + '', + false, + 'width:200px' +); $table_ichanges = ' @@ -502,19 +583,50 @@ $table_ichanges = '
'.$select_out.' - '.html_print_image('images/darrowright.png', true, ['id' => 'right_autorefreshlist', 'alt' => __('Push selected pages into autorefresh list'), 'title' => __('Push selected pages into autorefresh list')]).' + '.html_print_image( + 'images/darrowright.png', + true, + [ + 'id' => 'right_autorefreshlist', + 'alt' => __('Push selected pages into autorefresh list'), + 'title' => __('Push selected pages into autorefresh list'), + ] +).'

- '.html_print_image('images/darrowleft.png', true, ['id' => 'left_autorefreshlist', 'alt' => __('Pop selected pages out of autorefresh list'), 'title' => __('Pop selected pages out of autorefresh list')]).' + '.html_print_image( + 'images/darrowleft.png', + true, + [ + 'id' => 'left_autorefreshlist', + 'alt' => __('Pop selected pages out of autorefresh list'), + 'title' => __('Pop selected pages out of autorefresh list'), + ] +).'
'.$select_in.'
'; $data[0] .= $table_ichanges; -// time autorefresh +// Time autorefresh. $times = get_refresh_time_array(); -$data[1] = ''.__('Time autorefresh').ui_print_help_tip(__('Interval of autorefresh of the elements, by default they are 30 seconds, needing to enable the autorefresh first'), true).''; -$data[1] .= $jump.''.html_print_select($times, 'time_autorefresh', $user_info['time_autorefresh'], '', '', '', true, false, false).''; +$data[1] = ''.__('Time autorefresh'); +$data[1] .= ui_print_help_tip( + __('Interval of autorefresh of the elements, by default they are 30 seconds, needing to enable the autorefresh first'), + true +).''; +$data[1] .= $jump.''; +$data[1] .= html_print_select( + $times, + 'time_autorefresh', + $user_info['time_autorefresh'], + '', + '', + '', + true, + false, + false +).''; $table->rowclass[] = ''; $table->rowstyle[] = 'font-weight: bold;vertical-align: top'; @@ -528,7 +640,16 @@ $table->rowstyle[] = 'font-weight: bold;'; $table->data[] = $data; $data = []; -$data[0] = '
'.html_print_textarea('comments', 2, 60, $user_info['comments'], ($view_mode ? 'readonly="readonly"' : ''), true).'
'; +$data[0] = '
'; +$data[0] .= html_print_textarea( + 'comments', + 2, + 60, + $user_info['comments'], + (($view_mode) ? 'readonly="readonly"' : ''), + true +); +$data[0] .= '
'; $data[0] .= html_print_input_hidden('quick_language_change', 1, true); $table->colspan[count($table->data)][0] = 3; $table->rowclass[] = ''; @@ -594,9 +715,15 @@ if ($result === false) { foreach ($result as $profile) { $data[0] = ''.profile_get_name($profile['id_perfil']).''; if ($config['show_group_name']) { - $data[1] = ui_print_group_icon($profile['id_grupo'], true).''.' '.''; + $data[1] = ui_print_group_icon( + $profile['id_grupo'], + true + ).' '; } else { - $data[1] = ui_print_group_icon($profile['id_grupo'], true).''.' '.ui_print_truncate_text(groups_get_name($profile['id_grupo'], true), GENERIC_SIZE_TEXT).''; + $data[1] = ui_print_group_icon( + $profile['id_grupo'], + true + ).' '.ui_print_truncate_text(groups_get_name($profile['id_grupo'], true), GENERIC_SIZE_TEXT).''; } $tags_ids = explode(',', $profile['tags']);