';
diff --git a/htdocs/user/group/ldap.php b/htdocs/user/group/ldap.php
index bf39a128137..2ced8e11d4b 100644
--- a/htdocs/user/group/ldap.php
+++ b/htdocs/user/group/ldap.php
@@ -45,9 +45,9 @@ $action = GETPOST('action', 'alpha');
$socid=0;
if ($user->societe_id > 0) $socid = $user->societe_id;
-$fgroup = new Usergroup($db);
-$fgroup->fetch($id);
-$fgroup->getrights();
+$object = new Usergroup($db);
+$object->fetch($id);
+$object->getrights();
/*
@@ -61,12 +61,12 @@ if ($action == 'dolibarr2ldap')
$ldap=new Ldap();
$result=$ldap->connect_bind();
- $info=$fgroup->_load_ldap_info();
+ $info=$object->_load_ldap_info();
// Get a gid number for objectclass PosixGroup
if(in_array('posixGroup',$info['objectclass']))
$info['gidNumber'] = $ldap->getNextGroupGid();
- $dn=$fgroup->_load_ldap_dn($info);
+ $dn=$object->_load_ldap_dn($info);
$olddn=$dn; // We can say that old dn = dn as we force synchro
$result=$ldap->update($dn,$info,$user,$olddn);
@@ -93,23 +93,21 @@ llxHeader();
$form = new Form($db);
-$head = group_prepare_head($fgroup);
+$head = group_prepare_head($object);
-dol_fiche_head($head, 'ldap', $langs->trans("Group"), 0, 'group');
+dol_fiche_head($head, 'ldap', $langs->trans("Group"), -1, 'group');
+
+dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin);
+
+print '
';
+print '
';
print '
';
-// Ref
-print '| '.$langs->trans("Ref").' | ';
-print '';
-print $form->showrefnav($fgroup,'id','',$canreadperms);
-print ' | ';
-print '
';
-
// Name
-print '| '.$langs->trans("Name").' | ';
-print ''.$fgroup->name;
-if (!$fgroup->entity)
+print ' |
| '.$langs->trans("Name").' | ';
+print ''.$object->name;
+if (!$object->entity)
{
print img_picto($langs->trans("GlobalGroup"),'redstar');
}
@@ -117,7 +115,7 @@ print " |
\n";
// Note
print '| '.$langs->trans("Note").' | ';
-print ''.nl2br($fgroup->note).' | ';
+print ''.nl2br($object->note).' | ';
print "
\n";
$langs->load("admin");
@@ -137,6 +135,9 @@ print "
\n";
print '
';
+dol_fiche_end();
+
+
/*
* Barre d'actions
*/
@@ -145,7 +146,7 @@ print '
\n";
@@ -169,9 +170,9 @@ $ldap=new Ldap();
$result=$ldap->connect_bind();
if ($result > 0)
{
- $info=$fgroup->_load_ldap_info();
- $dn=$fgroup->_load_ldap_dn($info,1);
- $search = "(".$fgroup->_load_ldap_dn($info,2).")";
+ $info=$object->_load_ldap_info();
+ $dn=$object->_load_ldap_dn($info,1);
+ $search = "(".$object->_load_ldap_dn($info,2).")";
$records = $ldap->getAttribute($dn,$search);
//var_dump($records);
diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php
index 50b1bc56c5e..5262857afb2 100644
--- a/htdocs/user/group/perms.php
+++ b/htdocs/user/group/perms.php
@@ -82,16 +82,16 @@ llxHeader('',$langs->trans("Permissions"));
if ($id)
{
- $fgroup = new Usergroup($db);
- $fgroup->fetch($id);
- $fgroup->getrights();
+ $object = new Usergroup($db);
+ $object->fetch($id);
+ $object->getrights();
/*
* Affichage onglets
*/
- $head = group_prepare_head($fgroup);
+ $head = group_prepare_head($object);
$title = $langs->trans("Group");
- dol_fiche_head($head, 'rights', $title, 0, 'group');
+ dol_fiche_head($head, 'rights', $title, -1, 'group');
// Charge les modules soumis a permissions
$modules = array();
@@ -127,7 +127,7 @@ if ($id)
// Load all permissions
if ($objMod->rights_class)
{
- $entity=((! empty($conf->multicompany->enabled) && ! empty($fgroup->entity)) ? $fgroup->entity : null);
+ $entity=((! empty($conf->multicompany->enabled) && ! empty($object->entity)) ? $object->entity : null);
$ret=$objMod->insert_permissions(0, $entity);
$modules[$objMod->rights_class]=$objMod;
}
@@ -150,7 +150,7 @@ if ($id)
{
if (empty($conf->multicompany->transverse_mode))
{
- $sql.= " AND r.entity = ".$fgroup->entity;
+ $sql.= " AND r.entity = ".$object->entity;
}
else
{
@@ -162,7 +162,7 @@ if ($id)
$sql.= " AND r.entity IN (0,".$conf->entity.")";
}
- $sql.= " AND ugr.fk_usergroup = ".$fgroup->id;
+ $sql.= " AND ugr.fk_usergroup = ".$object->id;
$result=$db->query($sql);
@@ -183,32 +183,31 @@ if ($id)
dol_print_error($db);
}
-
+
+
+ dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin);
+
+ print '
';
+ print '
';
+
/*
* Ecran ajout/suppression permission
*/
print '
';
- // Ref
- print '| '.$langs->trans("Ref").' | ';
- print '';
- print $form->showrefnav($fgroup,'id','',$user->rights->user->user->lire || $user->admin);
- print ' | ';
- print '
';
-
// Nom
- print '| '.$langs->trans("Name").' | ';
- print ''.$fgroup->name.'';
- if (! $fgroup->entity)
+ print ' |
| '.$langs->trans("Name").' | ';
+ print ''.$object->name.'';
+ if (! $object->entity)
{
print img_picto($langs->trans("GlobalGroup"),'redstar');
}
print " |
\n";
// Note
- print '| '.$langs->trans("Note").' | ';
- print ''.dol_htmlentitiesbr($fgroup->note).' | ';
+ print '
| '.$langs->trans("Description").' | ';
+ print ''.dol_htmlentitiesbr($object->note).' | ';
print "
\n";
print '
';
@@ -230,7 +229,7 @@ if ($id)
{
if (empty($conf->multicompany->transverse_mode))
{
- $sql.= " AND r.entity = ".$fgroup->entity;
+ $sql.= " AND r.entity = ".$object->entity;
}
else
{
@@ -280,9 +279,9 @@ if ($id)
print '
'.img_object('',$picto).' '.$objMod->getName();
print ' | ';
print '
';
- print ''.$langs->trans("All")."";
+ print ''.$langs->trans("All")."";
print '/';
- print ''.$langs->trans("None")."";
+ print ''.$langs->trans("None")."";
print ' | ';
print '
| ';
print '';
@@ -299,7 +298,7 @@ if ($id)
// Own permission by group
if ($caneditperms)
{
- print '
'.img_edit_remove($langs->trans("Remove")).' | ';
+ print '
'.img_edit_remove($langs->trans("Remove")).' | ';
}
print '
';
print img_picto($langs->trans("Active"),'tick');
@@ -310,7 +309,7 @@ if ($id)
// Do not own permission
if ($caneditperms)
{
- print ' | '.img_edit_add($langs->trans("Add")).' | ';
+ print '
'.img_edit_add($langs->trans("Add")).' | ';
}
print '
  | ';
}
@@ -324,6 +323,10 @@ if ($id)
}
}
print '