From af3f18750e201a3a9fd44aec53e5eca819339de0 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Tue, 25 Oct 2011 09:22:29 +0000 Subject: [PATCH] 2011-10-25 Sergio Martin * godmode/agentes/module_manager_editor.php: Fixed keep_alive modules creation bug hidding the configuration data textarea git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5080 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ .../godmode/agentes/module_manager_editor.php | 19 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 100d48d8bf..6f68e9ef82 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2011-10-25 Sergio Martin + + * godmode/agentes/module_manager_editor.php: Fixed keep_alive + modules creation bug hidding the configuration data textarea + 2011-10-25 Sergio Martin * include/functions_html.php: Deleted problematic name change diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index 2ff6488601..e4c19c4591 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -411,7 +411,7 @@ $(document).ready (function () { regexp_name = new RegExp('module_name\\s*' + name+"\n"); - if (remote_config.match(regexp_name)) return true; + if (remote_config.match(regexp_name) || $("#id_module_type").val()==100 || $("#hidden-id_module_type_hidden").val()==100) return true; else { alert(""); return false; @@ -420,6 +420,23 @@ $(document).ready (function () { return true; }); + + function checkKeepaliveModule() { + // keepalive modules have id = 100 + if($("#id_module_type").val()==100 || $("#hidden-id_module_type_hidden").val()==100) { + $("#simple-configuration_data").hide(); + } + else { + $("#simple-configuration_data").show(); + } + + } + + checkKeepaliveModule(); + + $("#id_module_type").change (function () { + checkKeepaliveModule(); + }); }); /* ]]> */