'.__('Console notifications').'
'.__('E-mail notifications').'
'; $sources = notifications_get_all_sources(); $disabled_flag = []; $user_login = $config['id_user']; foreach ($sources as $source) { // Enabled notification user. $users_notification = notifications_get_user_sources( [ 'id_source' => $source['id'], 'id_user' => $user_login, ], ['id_user'] ); if ((boolean) $source['enabled'] === true && $users_notification[0]['id_user'] === $user_login) { echo '
'; $table_content = [ notifications_print_user_switch($source, $id, 'enabled'), notifications_print_user_switch($source, $id, 'also_mail'), ]; $notifications_enabled = notifications_print_user_switch($source, $id, 'enabled'); $notifications_also_mail = notifications_print_user_switch($source, $id, 'also_mail'); $disabled_flag[] = true; echo '
'.$source['description'].'
'; echo '
'.$notifications_enabled['switch'].'
'; echo '
'.$notifications_also_mail['switch'].'
'; echo '
'; } } if (count($disabled_flag) === 0) { ui_print_warning_message( __('Controls have been disabled by the system administrator') ); } echo ''; // Print id user to handle it on js. html_print_input_hidden('id_user', $id); ?>