retour sur page après creation de groupe (ref #126)

This commit is contained in:
afornerot 2020-04-20 09:09:21 +02:00
parent 3cdf970377
commit 57df7bddbe
2 changed files with 7 additions and 3 deletions

View File

@ -8,7 +8,7 @@ INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES
(-100, 'DRAAF', '130007107');
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}lfWLOzsWTTGkrbaPndkzPSiFKH078TmD
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}9tH17tlC86xamslwYLnhF4qiMaQqvbuL
', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');

View File

@ -31,6 +31,7 @@ class GroupController extends Controller
private $labelentity = 'CadolesCoreBundle:Group';
private $labeldata = 'group';
private $labeldatas = 'groups';
private $idpage;
public function listAction($access)
{
@ -756,7 +757,7 @@ class GroupController extends Controller
$this->ctrlFgcanshare($data,$access);
// Retour à la liste
return $this->redirectToRoute("cadoles_core_".$access."_group_users",["id"=>$data->getId()]);
return $this->redirectToRoute("cadoles_core_".$access."_group_users",["id"=>$data->getId(),"idreturn"=>$this->idpage]);
}
// Affichage du formulaire
@ -1098,7 +1099,10 @@ class GroupController extends Controller
$em->persist($page);
$em->persist($group);
$em->flush();
}
$pages=$group->getPages();
$this->idpage=$pages[0]->getId();
// On regarde s'il a au moins un calendrier
if($group->getCalendars()->isEmpty()) {