Fix some regression with new architecture for groups
This commit is contained in:
parent
01f96b35ed
commit
200c29bd14
@ -1993,6 +1993,8 @@ else
|
|||||||
|
|
||||||
if ($canreadgroup)
|
if ($canreadgroup)
|
||||||
{
|
{
|
||||||
|
print '<!-- Group section -->'."\n";
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("ListOfGroupsForUser"), '', '');
|
print load_fiche_titre($langs->trans("ListOfGroupsForUser"), '', '');
|
||||||
|
|
||||||
// On selectionne les groupes auquel fait parti le user
|
// On selectionne les groupes auquel fait parti le user
|
||||||
@ -2031,13 +2033,11 @@ else
|
|||||||
print $form->select_dolgroups('', 'group', 1, $exclude, 0, '', '', $object->entity);
|
print $form->select_dolgroups('', 'group', 1, $exclude, 0, '', '', $object->entity);
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="hidden" name="entity" value="'.$conf->entity.'" />';
|
print '<input type="hidden" name="entity" value="'.$conf->entity.'" />';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'" />';
|
print '<input type="submit" class="button buttongen" value="'.$langs->trans("Add").'" />';
|
||||||
}
|
}
|
||||||
print '</th></tr>'."\n";
|
print '</th></tr>'."\n";
|
||||||
|
|
||||||
/*
|
// List of groups of user
|
||||||
* Groups assigned to user
|
|
||||||
*/
|
|
||||||
if (!empty($groupslist))
|
if (!empty($groupslist))
|
||||||
{
|
{
|
||||||
foreach ($groupslist as $group)
|
foreach ($groupslist as $group)
|
||||||
@ -2085,7 +2085,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fiche en mode edition
|
* Card in edit mode
|
||||||
*/
|
*/
|
||||||
if ($action == 'edit' && ($canedituser || $caneditfield || $caneditpassword || ($user->id == $object->id)))
|
if ($action == 'edit' && ($canedituser || $caneditfield || $caneditpassword || ($user->id == $object->id)))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -160,6 +160,8 @@ class UserGroup extends CommonObject
|
|||||||
$result = $this->fetchCommon($id);
|
$result = $this->fetchCommon($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->name = $this->nom; // For compatibility with field name
|
||||||
|
|
||||||
if($result)
|
if($result)
|
||||||
{
|
{
|
||||||
if ($load_members)
|
if ($load_members)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user