fixed error with block current value

This commit is contained in:
Marcos Alconada 2021-06-24 12:28:49 +00:00 committed by Daniel Rodriguez
parent 86abd75206
commit 4bbd0ae508
1 changed files with 20 additions and 36 deletions
pandora_console/include/class

View File

@ -644,20 +644,6 @@ class AgentWizard extends HTML
'return' => true, 'return' => true,
], ],
]; ];
if (empty($this->idPolicy) === true) {
$inputs[] = [
'label' => __('Use agent IP'),
'id' => 'txt-use-agent-ip',
'arguments' => [
'name' => 'use-agent-ip',
'input_class' => 'flex-row',
'type' => 'checkbox',
'class' => '',
'return' => true,
],
];
}
} }
if ($this->actionType === 'wmi') { if ($this->actionType === 'wmi') {
@ -5694,30 +5680,28 @@ class AgentWizard extends HTML
selectedBlock selectedBlock
.parent() .parent()
.removeClass("alpha50"); .removeClass("alpha50");
if (selectedBlock.prop("checked")) { if (selectedBlock.prop("checked")) {
// Set to active the values of fields. // Set to active the values of fields.
$("[id*=hidden-module-active-"+blockNumber+"]") for (i = 0; i<=15; i++) {
.each(function(){ document.getElementById("hidden-module-active-" + switchName[2] + "_"+i+"-"+i).value = 1;
$(this).val('1'); }
}); // Set checked.
// Set checked. $("[id*=checkbox-sel_module_" + blockNumber + "]")
$("[id*=checkbox-sel_module_" + blockNumber + "]") .each(function() {
.each(function() { $(this).prop("checked", true);
$(this).prop("checked", true); });
}); imageInfoModules.removeClass('hidden');
imageInfoModules.removeClass('hidden'); } else {
} else {
// Set to inactive the values of fields. // Set to inactive the values of fields.
$("[id*=hidden-module-active-"+blockNumber+"]") for (i = 0; i<=15; i++) {
.each(function(){ document.getElementById("hidden-module-active-" + switchName[2] + "_"+i+"-"+i).value = 0;
$(this).val('0'); }
}); // Set unchecked.
// Set unchecked. $("[id*=checkbox-sel_module_" + blockNumber + "]")
$("[id*=checkbox-sel_module_" + blockNumber + "]") .each(function() {
.each(function() { $(this).prop("checked", false);
$(this).prop("checked", false); });
}); imageInfoModules.addClass('hidden');
imageInfoModules.addClass('hidden');
} }
} else if (type == 'module') { } else if (type == 'module') {
// Getting the element. // Getting the element.