Merge branch 'ent-6580-bug-en-la-edicion-de-grupos-asignando-como-padre-a-si-mismo' into 'develop'
exclude branch from select_for_Groups given group_id See merge request artica/pandorafms!3550
This commit is contained in:
commit
fa9f4bca95
|
@ -168,7 +168,15 @@ if ($id_group) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$table->data[2][1] = '<div class="w250px inline">';
|
$table->data[2][1] = '<div class="w250px inline">';
|
||||||
$table->data[2][1] .= html_print_select_groups(false, 'AR', true, 'id_parent', $id_parent, '', '', '', true);
|
$table->data[2][1] .= html_print_input(
|
||||||
|
[
|
||||||
|
'type' => 'select_groups',
|
||||||
|
'name' => 'id_parent',
|
||||||
|
'selected' => $id_parent,
|
||||||
|
'return' => true,
|
||||||
|
'returnAllGroup' => true,
|
||||||
|
]
|
||||||
|
);
|
||||||
$table->data[2][1] .= '</div>';
|
$table->data[2][1] .= '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -428,7 +428,7 @@ function html_print_select_style($fields, $name, $selected='', $style='', $scrip
|
||||||
* @param boolean $disabled Disabled or enabled.
|
* @param boolean $disabled Disabled or enabled.
|
||||||
* @param boolean $style CSS inline style.
|
* @param boolean $style CSS inline style.
|
||||||
* @param string $option_style CSS inline style in array format.
|
* @param string $option_style CSS inline style in array format.
|
||||||
* @param array $id_group Groups to be manually added.
|
* @param integer $id_group Exclude group branch from id_group.
|
||||||
* @param string $keys_field Field to be used as array key, (id).
|
* @param string $keys_field Field to be used as array key, (id).
|
||||||
* @param boolean $strict_user Strict.
|
* @param boolean $strict_user Strict.
|
||||||
* @param array $delete_groups Remove groups from select.
|
* @param array $delete_groups Remove groups from select.
|
||||||
|
@ -500,6 +500,15 @@ function html_print_select_groups(
|
||||||
$name = 'group_select'.$idcounter[$name];
|
$name = 'group_select'.$idcounter[$name];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($id_group !== false) {
|
||||||
|
$children = groups_get_children($id_group);
|
||||||
|
foreach ($children as $child) {
|
||||||
|
$delete_groups[] = $child['id_grupo'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$delete_groups[] = $id_group;
|
||||||
|
}
|
||||||
|
|
||||||
$fields = [];
|
$fields = [];
|
||||||
// Preload selector.
|
// Preload selector.
|
||||||
if (is_array($selected) === false) {
|
if (is_array($selected) === false) {
|
||||||
|
|
Loading…
Reference in New Issue