From ae47e7c03a61d42b8736cdcac569513ef74a9e8d Mon Sep 17 00:00:00 2001
From: alejandro-campos <alejandro.campos@artica.es>
Date: Fri, 3 Aug 2018 14:40:51 +0200
Subject: [PATCH 1/2] added redirection after module deletion on agent modules
 view

---
 pandora_console/godmode/agentes/configurar_agente.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php
index ed52464dc0..0c556e2f51 100644
--- a/pandora_console/godmode/agentes/configurar_agente.php
+++ b/pandora_console/godmode/agentes/configurar_agente.php
@@ -1720,6 +1720,9 @@ if ($delete_module) { // DELETE agent module !
 		db_pandora_audit("Agent management",
 			"Deleted module '".$module_data["nombre"]."' for agent ".$agent["alias"]);
 	}
+
+	header("Location: index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente=$id_agente");
+
 }
 
 // MODULE DUPLICATION

From 8e55522e3fc80669c65d2ca3309c60671f399f8c Mon Sep 17 00:00:00 2001
From: alejandro-campos <alejandro.campos@artica.es>
Date: Fri, 3 Aug 2018 15:18:03 +0200
Subject: [PATCH 2/2] added alert message on module deletion at agent modules
 view

---
 pandora_console/godmode/agentes/configurar_agente.php | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php
index 0c556e2f51..f41adc8550 100644
--- a/pandora_console/godmode/agentes/configurar_agente.php
+++ b/pandora_console/godmode/agentes/configurar_agente.php
@@ -1714,14 +1714,17 @@ if ($delete_module) { // DELETE agent module !
 		ui_print_error_message(__('There was a problem deleting the module'));
 	}
 	else {
-		ui_print_success_message(__('Module deleted succesfully'));
+
+		echo '<script type="text/javascript">
+		location="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente='.$id_agente.'";
+		alert("'.__('Module deleted succesfully').'");
+		</script>';
 		
 		$agent = db_get_row ('tagente', 'id_agente', $id_agente);
 		db_pandora_audit("Agent management",
 			"Deleted module '".$module_data["nombre"]."' for agent ".$agent["alias"]);
 	}
 
-	header("Location: index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente=$id_agente");
 
 }