diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index c6ff89ade31..9f325fb220e 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -5202,7 +5202,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $srco
'asset' => 'money-check-alt', 'autofill' => 'fill',
'back' => 'arrow-left', 'bank_account' => 'university',
'bill' => 'file-invoice-dollar', 'billa' => 'file-excel', 'billr' => 'file-invoice-dollar', 'billd' => 'file-medical',
- 'bookcal' => 'calendar-check',
+ 'blank' => 'fw', 'bookcal' => 'calendar-check',
'supplier_invoice' => 'file-invoice-dollar', 'supplier_invoicea' => 'file-excel', 'supplier_invoicer' => 'file-invoice-dollar', 'supplier_invoiced' => 'file-medical',
'bom' => 'shapes',
'card' => 'address-card', 'chart' => 'chart-line', 'company' => 'building', 'contact' => 'address-book', 'contract' => 'suitcase', 'collab' => 'people-arrows', 'conversation' => 'comments', 'country' => 'globe-americas', 'cron' => 'business-time', 'cross' => 'times',
@@ -5427,7 +5427,7 @@ function getImgPictoNameList()
return array(
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
'accountancy', 'accounting_account', 'account', 'accountline', 'action', 'add', 'address', 'ai', 'angle-double-down', 'angle-double-up', 'asset',
- 'back', 'bank_account', 'barcode', 'bank', 'bell', 'bill', 'billa', 'billr', 'billd', 'birthday-cake', 'bom', 'bookcal', 'bookmark', 'briefcase-medical', 'bug', 'building',
+ 'back', 'bank_account', 'barcode', 'bank', 'bell', 'bill', 'billa', 'billr', 'billd', 'birthday-cake', 'blank', 'bom', 'bookcal', 'bookmark', 'briefcase-medical', 'bug', 'building',
'card', 'calendarlist', 'calendar', 'calendarmonth', 'calendarweek', 'calendarday', 'calendarperuser', 'calendarpertype', 'hourglass',
'cash-register', 'category', 'chart', 'check', 'clock', 'clone', 'close_title', 'code', 'cog', 'collab', 'company', 'contact', 'country', 'contract', 'conversation', 'cron', 'cross', 'cubes',
'check-circle', 'check-square', 'circle', 'stop-circle', 'currency', 'multicurrency',
diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php
index d0222f18e45..2ad47f61568 100644
--- a/htdocs/user/perms.php
+++ b/htdocs/user/perms.php
@@ -485,31 +485,6 @@ if ($result) {
$objMod = $modules[$obj->module];
- // Save field module_position in database if value is wrong
- /*
- if (empty($obj->module_position) || (is_object($objMod) && $objMod->isCoreOrExternalModule() == 'external' && $obj->module_position < 100000)) {
- if (is_object($modules[$obj->module]) && ($modules[$obj->module]->module_position > 0)) {
- // TODO Define familyposition
- //$familyposition = $modules[$obj->module]->family_position;
- $familyposition = 0;
-
- $newmoduleposition = $modules[$obj->module]->module_position;
-
- // Correct $newmoduleposition position for external modules
- $objMod = $modules[$obj->module];
- if (is_object($objMod) && $objMod->isCoreOrExternalModule() == 'external' && $newmoduleposition < 100000) {
- $newmoduleposition += 100000;
- }
-
- $sqlupdate = 'UPDATE '.MAIN_DB_PREFIX."rights_def SET module_position = ".((int) $newmoduleposition).",";
- $sqlupdate .= " family_position = ".((int) $familyposition);
- $sqlupdate .= " WHERE module_position = ".((int) $obj->module_position)." AND module = '".$db->escape($obj->module)."'";
-
- $db->query($sqlupdate);
- }
- }
- */
-
if (GETPOSTISSET('forbreakperms_'.$obj->module)) {
$ishidden = GETPOSTINT('forbreakperms_'.$obj->module);
} elseif (in_array($j, $cookietohidegrouparray)) { // If j is among list of hidden group
@@ -556,6 +531,7 @@ if ($result) {
print img_object('', $picto, 'class="pictoobjectwidth paddingright"').' '.$objMod->getName();
print '';
print '';
+
// Permission and tick (2 columns)
if (($caneditperms && empty($objMod->rights_admin_allowed)) || empty($object->admin)) {
if ($caneditperms) {
@@ -587,31 +563,38 @@ if ($result) {
print '
| ';
}
}
+
// Description of permission (2 columns)
print ' | ';
print '';
- print '';
+
+ print ' ';
print img_picto('', 'folder', 'class="marginright"');
print ' ';
- print ' ';
+ print ' ';
print img_picto('', 'folder-open', 'class="marginright"');
print ' ';
+
print ' | '; //Add picto + / - when open en closed
print ''."\n";
}
+ $permlabel = (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && ($langs->trans("PermissionAdvanced".$obj->id) != "PermissionAdvanced".$obj->id) ? $langs->trans("PermissionAdvanced".$obj->id) : (($langs->trans("Permission".$obj->id) != "Permission".$obj->id) ? $langs->trans("Permission".$obj->id) : $langs->trans($obj->label)));
+
print ''."\n";
print '';
// Picto and label of module
- print '| ';
+ print ' | ';
print ' | ';
// Permission and tick (2 columns)
if (!empty($object->admin) && !empty($objMod->rights_admin_allowed)) { // Permission granted because admin
print '';
if ($caneditperms) {
- print ''.img_picto($langs->trans("AdministratorDesc"), 'star').' | ';
+ print '';
+ print img_picto($langs->trans("AdministratorDesc"), 'star');
+ print ' | ';
} else {
print '';
print img_picto($langs->trans("Active"), 'switch_on', '', 0, 0, 0, '', 'opacitymedium');
@@ -622,11 +605,12 @@ if ($result) {
} elseif (in_array($obj->id, $permsuser)) { // Permission granted by user
print '';
if ($caneditperms) {
- print ' | ';
+ print ' | ';
print 'id.'&action=delrights&token='.newToken().'&entity='.$entity.'&rights='.$obj->id.'&confirm=yes&updatedmodulename='.$obj->module.'">';
//print img_edit_remove($langs->trans("Remove"));
print img_picto($langs->trans("Remove"), 'switch_on');
- print ' | ';
+ print '';
+ print '';
} else {
print '';
print img_picto($langs->trans("Active"), 'switch_on', '', 0, 0, 0, '', 'opacitymedium');
@@ -641,7 +625,7 @@ if ($result) {
print img_picto($langs->trans("Active"), 'switch_on', '', 0, 0, 0, '', 'opacitymedium');
//print img_picto($langs->trans("Active"), 'tick');
print ' | ';
- print '';
+ print ' | ';
print $form->textwithtooltip($langs->trans("Inherited"), $langs->trans("PermissionInheritedFromAGroup"));
print ' | ';
} else {
@@ -651,7 +635,8 @@ if ($result) {
print 'id.'&action=addrights&entity='.$entity.'&rights='.$obj->id.'&confirm=yes&token='.newToken().'&updatedmodulename='.$obj->module.'">';
//print img_edit_add($langs->trans("Add"));
print img_picto($langs->trans("Add"), 'switch_off');
- print '';
+ print '';
+ print '';
} else {
print '';
print img_picto($langs->trans("Disabled"), 'switch_off', '', 0, 0, 0, '', 'opacitymedium');
@@ -664,27 +649,28 @@ if ($result) {
// Do not own permission
print '';
if ($caneditperms) {
- print ' | ';
+ print ' | ';
print 'id.'&action=addrights&entity='.$entity.'&rights='.$obj->id.'&confirm=yes&token='.newToken().'&updatedmodulename='.$obj->module.'">';
//print img_edit_add($langs->trans("Add"));
print img_picto($langs->trans("Add"), 'switch_off');
- print ' | ';
+ print '';
+ print '';
} else {
- print '';
+ print ' | ';
print img_picto($langs->trans("Disabled"), 'switch_off', '', 0, 0, 0, '', 'opacitymedium');
print ' | ';
}
- print '';
+ print ' | ';
print ' | ';
}
- // Description of permission (2 columns)
- $permlabel = (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && ($langs->trans("PermissionAdvanced".$obj->id) != "PermissionAdvanced".$obj->id) ? $langs->trans("PermissionAdvanced".$obj->id) : (($langs->trans("Permission".$obj->id) != "Permission".$obj->id) ? $langs->trans("Permission".$obj->id) : $langs->trans($obj->label)));
+ // Description of permission (1 or 2 columns)
if (!$user->admin) {
print '';
} else {
print ' | ';
}
+
print $permlabel;
$idtouse = $obj->id;
if (in_array($idtouse, array(121, 122, 125, 126))) { // Force message for the 3 permission on third parties
@@ -731,7 +717,7 @@ if ($result) {
print ' | ';
$htmltext = $langs->trans("ID").': '.$obj->id;
$htmltext .= ' '.$langs->trans("Permission").': user->hasRight(\''.dol_escape_htmltag($obj->module).'\', \''.dol_escape_htmltag($obj->perms).'\''.($obj->subperms ? ', \''.dol_escape_htmltag($obj->subperms).'\'' : '').')';
- print $form->textwithpicto('', $htmltext);
+ print $form->textwithpicto('', $htmltext, 1, 'help', 'inline-block marginrightonly');
//print ''.$obj->id.'';
print ' | ';
}