diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 1ededd091b3..a6dcce7e027 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -469,10 +469,13 @@ if ($result) { } */ - $isexpanded = ($updatedmodulename == $obj->module || $module == "allmodules"); + /*$isexpanded = ($updatedmodulename == $obj->module || $module == "allmodules"); if (!$action) { $isexpanded = 1; // By default (no action done) we have lines expanded - } + }*/ + $ishidden = GETPOST('forbreakperms_'.$obj->module, 'int'); + $isexpanded = ! $ishidden; + //var_dump($isexpanded); // Break found, it's a new module to catch if (isset($obj->module) && ($oldmod <> $obj->module)) { @@ -484,38 +487,39 @@ if ($result) { // Show break line print ''; - print ''; + print ''; + print ''; print img_object('', $picto, 'class="pictoobjectwidth paddingright"').' '.$objMod->getName(); print ''; print ''; if (($caneditperms && empty($objMod->rights_admin_allowed)) || empty($object->admin)) { if ($caneditperms) { print ''; - print 'module.'&confirm=yes&updatedmodulename='.$obj->module.'">'.$langs->trans("All").""; + print 'module.'&confirm=yes&updatedmodulename='.$obj->module.'">'.$langs->trans("All").""; print ' / '; - print 'module.'&confirm=yes&updatedmodulename='.$obj->module.'">'.$langs->trans("None").""; + print 'module.'&confirm=yes&updatedmodulename='.$obj->module.'">'.$langs->trans("None").""; print ''; - print ' '; + print ' '; } else { - print ' '; + print ' '; } - print ' '; + print ' '; } else { if ($caneditperms) { print ''; - print 'module.'&confirm=yes&updatedmodulename='.$obj->module.'">'.$langs->trans("All").""; + print 'module.'&confirm=yes&updatedmodulename='.$obj->module.'">'.$langs->trans("All").""; print ' / '; - print 'module.'&confirm=yes&updatedmodulename='.$obj->module.'">'.$langs->trans("None").""; + print 'module.'&confirm=yes&updatedmodulename='.$obj->module.'">'.$langs->trans("None").""; print ''; - print ' '; + print ' '; } else { - print ''; + print ''; } - print ' '; + print ' '; } - print ' '; + print ' '; - print ''; + print ''; print ''; @@ -629,42 +633,49 @@ print ''; print ''; print '