mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Merge branch 'ent-11480-widget-de-estado-de-grupos-no-deberia-mostar-grupos-vacios' into 'develop'
Ent 11480 Widget de estado de grupos no deberia mostar grupos vacios See merge request artica/pandorafms!6152
This commit is contained in:
commit
6b3b98ac04
@ -395,7 +395,9 @@ class SystemGroupStatusWidget extends Widget
|
|||||||
$user_groups = users_get_groups(false, 'AR', $return_all_group);
|
$user_groups = users_get_groups(false, 'AR', $return_all_group);
|
||||||
|
|
||||||
$selected_groups = explode(',', $this->values['groupId'][0]);
|
$selected_groups = explode(',', $this->values['groupId'][0]);
|
||||||
|
$all_group_selected = false;
|
||||||
if (in_array(0, $selected_groups) === true) {
|
if (in_array(0, $selected_groups) === true) {
|
||||||
|
$all_group_selected = true;
|
||||||
$selected_groups = [];
|
$selected_groups = [];
|
||||||
foreach (groups_get_all() as $key => $name_group) {
|
foreach (groups_get_all() as $key => $name_group) {
|
||||||
$selected_groups[] = groups_get_id($name_group);
|
$selected_groups[] = groups_get_id($name_group);
|
||||||
@ -480,7 +482,12 @@ class SystemGroupStatusWidget extends Widget
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->values['groupId'] = $selected_groups;
|
if ($all_group_selected === true && $this->values['groupRecursion'] === true) {
|
||||||
|
$this->values['groupId'] = array_keys($result_groups);
|
||||||
|
} else {
|
||||||
|
$this->values['groupId'] = $selected_groups;
|
||||||
|
}
|
||||||
|
|
||||||
$this->values['status'] = explode(',', $this->values['status'][0]);
|
$this->values['status'] = explode(',', $this->values['status'][0]);
|
||||||
|
|
||||||
$style = 'font-size: 1.5em; font-weight: bolder;text-align: center;';
|
$style = 'font-size: 1.5em; font-weight: bolder;text-align: center;';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user