From 4d5917e4b7d2ced54aeb6679f5048fa0e8f5e9cc Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 23 Oct 2023 14:56:09 +0200 Subject: [PATCH 1/2] #12269 widget editor title name widget --- pandora_console/include/javascript/pandora_dashboards.js | 3 ++- pandora_console/views/dashboard/cell.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/javascript/pandora_dashboards.js b/pandora_console/include/javascript/pandora_dashboards.js index 80d0625e4a..743d13ca76 100644 --- a/pandora_console/include/javascript/pandora_dashboards.js +++ b/pandora_console/include/javascript/pandora_dashboards.js @@ -461,12 +461,13 @@ function initialiceLayout(data) { } function configurationWidget(cellId, widgetId, size) { + title = $("#hidden-widget_name_" + cellId).val(); load_modal({ target: $("#modal-config-widget"), form: "form-config-widget", url: data.url, modal: { - title: "Configure widget", + title: "Configure widget " + title, cancel: "Cancel", ok: "Ok" }, diff --git a/pandora_console/views/dashboard/cell.php b/pandora_console/views/dashboard/cell.php index 919ce9e07e..512c6a19ff 100644 --- a/pandora_console/views/dashboard/cell.php +++ b/pandora_console/views/dashboard/cell.php @@ -60,6 +60,7 @@ if ($manageDashboards !== 0 || $writeDashboards !== 0) { $output .= ' '; $output .= ''; + $output .= html_print_input_hidden('widget_name_'.$cellData['id'], $options['title'], true); $output .= html_print_image( 'images/configuration@svg.svg', true, From 75aa7158058f262a7db62f3588f7ed7a85801003 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 24 Oct 2023 09:20:42 +0200 Subject: [PATCH 2/2] #12269 widget type on title at config/edit --- pandora_console/views/dashboard/cell.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/views/dashboard/cell.php b/pandora_console/views/dashboard/cell.php index 512c6a19ff..7d6bdd40a4 100644 --- a/pandora_console/views/dashboard/cell.php +++ b/pandora_console/views/dashboard/cell.php @@ -60,7 +60,8 @@ if ($manageDashboards !== 0 || $writeDashboards !== 0) { $output .= ' '; $output .= ''; - $output .= html_print_input_hidden('widget_name_'.$cellData['id'], $options['title'], true); + $widget_description = db_get_value_sql('SELECT description FROM twidget WHERE id ='.$cellData['id_widget']); + $output .= html_print_input_hidden('widget_name_'.$cellData['id'], $widget_description, true); $output .= html_print_image( 'images/configuration@svg.svg', true,