Merge branch 'ent-6477-error-en-la-seleccion-de-grupos-de-dashboards' into 'develop'
Minor fix all group empty label See merge request artica/pandorafms!3542
This commit is contained in:
commit
4ed68fee56
pandora_console/include
|
@ -519,7 +519,15 @@ function html_print_select_groups(
|
|||
}
|
||||
} else {
|
||||
foreach ($selected as $k) {
|
||||
$fields[$k] = groups_get_name($k);
|
||||
if ($k === null || $k === '') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$fields[$k] = groups_get_name($k, $returnAllGroup);
|
||||
}
|
||||
|
||||
if (empty($fields) === true && $returnAllGroup) {
|
||||
$fields[0] = groups_get_name(null, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -278,6 +278,11 @@ class TopNEventByGroupWidget extends Widget
|
|||
];
|
||||
|
||||
// Groups.
|
||||
$selected_groups = [];
|
||||
if ($values['groupId']) {
|
||||
$selected_groups = explode(',', $values['groupId'][0]);
|
||||
}
|
||||
|
||||
$inputs[] = [
|
||||
'label' => __('Groups'),
|
||||
'arguments' => [
|
||||
|
@ -285,7 +290,7 @@ class TopNEventByGroupWidget extends Widget
|
|||
'name' => 'groupId[]',
|
||||
'returnAllGroup' => true,
|
||||
'privilege' => 'AR',
|
||||
'selected' => explode(',', $values['groupId'][0]),
|
||||
'selected' => $selected_groups,
|
||||
'return' => true,
|
||||
'multiple' => true,
|
||||
],
|
||||
|
|
|
@ -277,6 +277,11 @@ class TopNEventByModuleWidget extends Widget
|
|||
],
|
||||
];
|
||||
|
||||
$selected_groups = [];
|
||||
if ($values['groupId']) {
|
||||
$selected_groups = explode(',', $values['groupId'][0]);
|
||||
}
|
||||
|
||||
// Groups.
|
||||
$inputs[] = [
|
||||
'label' => __('Groups'),
|
||||
|
@ -285,7 +290,7 @@ class TopNEventByModuleWidget extends Widget
|
|||
'name' => 'groupId[]',
|
||||
'returnAllGroup' => true,
|
||||
'privilege' => 'AR',
|
||||
'selected' => explode(',', $values['groupId'][0]),
|
||||
'selected' => $selected_groups,
|
||||
'return' => true,
|
||||
'multiple' => true,
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue