diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php
index 2e62f25d59..164c6f3983 100644
--- a/pandora_console/include/constants.php
+++ b/pandora_console/include/constants.php
@@ -173,6 +173,7 @@ define('COL_GRAPH13', '#E83128');
// Styles.
// Size of text in characters for truncate.
define('GENERIC_SIZE_TEXT', 50);
+define('MENU_SIZE_TEXT', 20);
diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php
index 706353f6e4..c073a8b30e 100644
--- a/pandora_console/include/functions_menu.php
+++ b/pandora_console/include/functions_menu.php
@@ -376,11 +376,11 @@ function menu_print_menu(&$menu)
if (isset($sub2['title'])) {
$sub_title = $sub2['title'];
} else {
- $sub_title = '';
+ $sub_title = $sub2['text'];
}
$submenu2_list .= '
';
- $submenu2_list .= ''.$sub2['text'].'
';
+ $submenu2_list .= ''.$sub2['text'].'
';
$sub_title = '';
}
diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php
index bd317ab674..b417e20b89 100644
--- a/pandora_console/operation/menu.php
+++ b/pandora_console/operation/menu.php
@@ -220,7 +220,7 @@ if (check_acl($config['id_user'], 0, 'VR') || check_acl($config['id_user'], 0, '
$name = io_safe_output($layout['name']);
- $sub2['operation/visual_console/render_view&id='.$layout['id']]['text'] = mb_substr($name, 0, 19);
+ $sub2['operation/visual_console/render_view&id='.$layout['id']]['text'] = ui_print_truncate_text($name, MENU_SIZE_TEXT, false, true, false);
$sub2['operation/visual_console/render_view&id='.$layout['id']]['id'] = mb_substr($name, 0, 19);
$sub2['operation/visual_console/render_view&id='.$layout['id']]['title'] = $name;
if (!empty($config['vc_refr'])) {
@@ -235,7 +235,7 @@ if (check_acl($config['id_user'], 0, 'VR') || check_acl($config['id_user'], 0, '
if ($break_max_console) {
$sub2['godmode/reporting/visual_console_favorite']['text'] = __('Show more').' >';
$sub2['godmode/reporting/visual_console_favorite']['id'] = 'visual_favourite_console';
- $sub2['godmode/reporting/visual_console_favorite']['title'] = 'show_more';
+ $sub2['godmode/reporting/visual_console_favorite']['title'] = __('Show more');
$sub2['godmode/reporting/visual_console_favorite']['refr'] = 0;
}
@@ -281,7 +281,7 @@ if (check_acl($config['id_user'], 0, 'MR') || check_acl($config['id_user'], 0, '
continue;
}
- $sub2['operation/gis_maps/render_view&map_id='.$gisMap['id_tgis_map']]['text'] = mb_substr(io_safe_output($gisMap['map_name']), 0, 15);
+ $sub2['operation/gis_maps/render_view&map_id='.$gisMap['id_tgis_map']]['text'] = ui_print_truncate_text(io_safe_output($gisMap['map_name']), MENU_SIZE_TEXT, false, true, false);
$sub2['operation/gis_maps/render_view&map_id='.$gisMap['id_tgis_map']]['id'] = mb_substr(io_safe_output($gisMap['map_name']), 0, 15);
$sub2['operation/gis_maps/render_view&map_id='.$gisMap['id_tgis_map']]['title'] = io_safe_output($gisMap['map_name']);
$sub2['operation/gis_maps/render_view&map_id='.$gisMap['id_tgis_map']]['refr'] = 0;
@@ -345,7 +345,7 @@ if (check_acl($config['id_user'], 0, 'RR') || check_acl($config['id_user'], 0, '
$name = io_safe_output($dashboard['name']);
$sub2['operation/dashboard/dashboard&dashboardId='.$dashboard['id']] = [
- 'text' => mb_substr($name, 0, 19),
+ 'text' => ui_print_truncate_text($name, MENU_SIZE_TEXT, false, true, false),
'title' => $name,
];
}
diff --git a/pandora_console/views/dashboard/formDashboard.php b/pandora_console/views/dashboard/formDashboard.php
index 05164f7b00..71b4ce906d 100644
--- a/pandora_console/views/dashboard/formDashboard.php
+++ b/pandora_console/views/dashboard/formDashboard.php
@@ -76,10 +76,11 @@ $inputs = [
[
'label' => __('Name'),
'arguments' => [
- 'type' => 'text',
- 'name' => 'name',
- 'value' => $arrayDashboard['name'],
- 'size' => '',
+ 'type' => 'text',
+ 'name' => 'name',
+ 'value' => $arrayDashboard['name'],
+ 'size' => '',
+ 'maxlength' => 35,
],
],
[