Merge branch 'ent-5110-formulario-de-modulos-remotos-erroneo' into 'develop'

Fixed bug in module creation view

See merge request artica/pandorafms!2954
This commit is contained in:
vgilc 2019-12-12 17:07:35 +01:00
commit 0a7f24192e
2 changed files with 8 additions and 3 deletions

View File

@ -466,11 +466,11 @@ $data[1] = html_print_select(
$array_os = [
'inherited' => __('Inherited'),
'linux' => __('Linux'),
'windows' => __('Windows'),
'linux' => __('SSH'),
'windows' => __('Windows remote'),
];
$data[2] = __('Target OS');
$data[2] = __('Connection method');
$data[3] = html_print_select(
$array_os,
'command_os',

View File

@ -7,6 +7,7 @@
var id_modules_icmp = Array(6, 7);
var id_modules_tcp = Array(8, 9, 10, 11);
var id_modules_snmp = Array(15, 16, 17, 18);
var id_modules_exec = Array(34, 35, 36, 37);
function configure_modules_form() {
$("#id_module_type").change(function() {
@ -23,6 +24,10 @@ function configure_modules_form() {
$("tr#simple-snmp_1, tr#simple-snmp_2").hide();
$("tr#simple-tcp_send, tr#simple-tcp_receive").show();
$("#text-tcp_port").removeAttr("disabled");
} else if (id_modules_exec.in_array(this.value)) {
$("tr#simple-tcp_send, tr#simple-tcp_receive").hide();
$("tr#simple-snmp_1, tr#simple-snmp_2").hide();
$("#text-tcp_port").attr("disabled", false);
}
});