mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
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
@ -519,7 +519,15 @@ function html_print_select_groups(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
foreach ($selected as $k) {
|
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.
|
// Groups.
|
||||||
|
$selected_groups = [];
|
||||||
|
if ($values['groupId']) {
|
||||||
|
$selected_groups = explode(',', $values['groupId'][0]);
|
||||||
|
}
|
||||||
|
|
||||||
$inputs[] = [
|
$inputs[] = [
|
||||||
'label' => __('Groups'),
|
'label' => __('Groups'),
|
||||||
'arguments' => [
|
'arguments' => [
|
||||||
@ -285,7 +290,7 @@ class TopNEventByGroupWidget extends Widget
|
|||||||
'name' => 'groupId[]',
|
'name' => 'groupId[]',
|
||||||
'returnAllGroup' => true,
|
'returnAllGroup' => true,
|
||||||
'privilege' => 'AR',
|
'privilege' => 'AR',
|
||||||
'selected' => explode(',', $values['groupId'][0]),
|
'selected' => $selected_groups,
|
||||||
'return' => true,
|
'return' => true,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
],
|
],
|
||||||
|
@ -277,6 +277,11 @@ class TopNEventByModuleWidget extends Widget
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$selected_groups = [];
|
||||||
|
if ($values['groupId']) {
|
||||||
|
$selected_groups = explode(',', $values['groupId'][0]);
|
||||||
|
}
|
||||||
|
|
||||||
// Groups.
|
// Groups.
|
||||||
$inputs[] = [
|
$inputs[] = [
|
||||||
'label' => __('Groups'),
|
'label' => __('Groups'),
|
||||||
@ -285,7 +290,7 @@ class TopNEventByModuleWidget extends Widget
|
|||||||
'name' => 'groupId[]',
|
'name' => 'groupId[]',
|
||||||
'returnAllGroup' => true,
|
'returnAllGroup' => true,
|
||||||
'privilege' => 'AR',
|
'privilege' => 'AR',
|
||||||
'selected' => explode(',', $values['groupId'][0]),
|
'selected' => $selected_groups,
|
||||||
'return' => true,
|
'return' => true,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user