';
// Ref
print '| ';
diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php
index 935c5028d20..3f350b7773e 100644
--- a/htdocs/user/group/card.php
+++ b/htdocs/user/group/card.php
@@ -45,12 +45,14 @@ if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS))
$langs->load("users");
$langs->load("other");
-$id=GETPOST('id', 'int');
-$action=GETPOST('action', 'alpha');
-$confirm=GETPOST('confirm', 'alpha');
-$userid=GETPOST('user', 'int');
+$id = GETPOST('id', 'int');
+$action = GETPOST('action', 'alpha');
+$cancel = GETPOST('cancel', 'aZ09');
+$confirm = GETPOST('confirm', 'alpha');
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'groupcard'; // To manage different context of search
+$userid = GETPOST('user', 'int');
+
// Security check
$result = restrictedArea($user, 'user', $id, 'usergroup&usergroup', 'user');
@@ -86,6 +88,21 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
if (empty($reshook)) {
+ if ($cancel)
+ {
+ if (! empty($backtopage))
+ {
+ header("Location: ".$backtopage);
+ exit;
+ }
+ else
+ {
+ header("Location: ".DOL_URL_ROOT.'/user/group/list.php');
+ exit;
+ }
+ $action='';
+ }
+
// Action remove group
if ($action == 'confirm_delete' && $confirm == "yes")
{
@@ -296,7 +313,11 @@ if ($action == 'create')
dol_fiche_end();
- print '';
+ print ' ';
+ print '';
+ print ' ';
+ print '';
+ print ' ';
print "";
}
diff --git a/htdocs/user/group/list.php b/htdocs/user/group/list.php
index ba7b30c9ca8..29bd19a25ae 100644
--- a/htdocs/user/group/list.php
+++ b/htdocs/user/group/list.php
@@ -130,6 +130,12 @@ if ($resql)
$text = $langs->trans("ListOfGroups");
+ $newcardbutton='';
+ if ($user->rights->propal->creer)
+ {
+ $newcardbutton=''.$langs->trans('NewGroup').'';
+ }
+
print ' |