diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/FileController.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/FileController.php index 55cf9d84..225aa24c 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/FileController.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/FileController.php @@ -300,7 +300,9 @@ class FileController extends Controller $urlsource= $fulldirectory."/".$oldname; $urldestination = $fulldirectory."/".$data["subdirectory"]; + if($urlsource!=$urldestination) { + if($fs->exists($urldestination)) { $form->addError(new FormError('Ce nom existe déjà')); $this->get('session')->getFlashBag()->clear(); @@ -325,7 +327,7 @@ class FileController extends Controller if($fs->exists($urlsource)) $fs->rename($urlsource,$urldestination,true); } - + $toclose=true; } } diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/RegistrationController.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/RegistrationController.php index 31749669..1a9eed00 100755 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/RegistrationController.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/RegistrationController.php @@ -212,7 +212,7 @@ class RegistrationController extends Controller // Sur erreur $this->getErrorForm(null,$form,$request,$data,"submit",$idstatut); - // Sur validation(z) + // Sur validation if ($form->get('submit')->isClicked() && $form->isValid()) { $data = $form->getData(); @@ -342,6 +342,8 @@ class RegistrationController extends Controller // A voir retour sur un écran d'info indiquant si validation par admion ou s'il doit matter ses email $this->get('session')->set('registrationinfo', $info); $this->get('session')->set('registrationmode', "info"); + $this->get('session')->set('registrationredirectto', null); + return $this->redirectToRoute('cadoles_core_registration_info'); } else { @@ -360,12 +362,16 @@ class RegistrationController extends Controller { $info = $this->get('session')->get('registrationinfo'); $mode = $this->get('session')->get('registrationmode'); + $redirectto = $this->get('session')->get('registrationredirectto'); + + return $this->render($this->labelentity.':info.html.twig', [ 'useheader' => true, 'usemenu' => false, 'usesidebar' => false, 'info' => $info, - 'mode' => $mode + 'mode' => $mode, + 'redirectto' => $redirectto, ]); } @@ -467,6 +473,7 @@ class RegistrationController extends Controller { $moderegistration = $this->getParameter('moderegistration'); $masteridentity = $this->getParameter('masteridentity'); + if($moderegistration=="none"||$masteridentity!="SQL") throw $this->createNotFoundException('Permission denied'); @@ -488,7 +495,8 @@ class RegistrationController extends Controller $mode="danger"; $this->get('session')->set('registrationinfo', $info); - $this->get('session')->set('registrationmode', $mode); + $this->get('session')->set('registrationmode', $mode); + $this->get('session')->set('registrationredirectto', null); } else { $url=$this->getUrlLogin(); @@ -539,10 +547,17 @@ class RegistrationController extends Controller // Si invitation à un groupe : on le rattache directement à ce groupe $groupid=$data[0]->getGroupid(); + $userid=$user->getId(); if($groupid) { $group=$em->getRepository("CadolesCoreBundle:Group")->find($groupid); if($group) { + $idpage =$group->getPages()->first()->getId(); + $url = $this->generateUrl('cadoles_core_redirect', ["route"=>"cadoles_core_home","id"=>$idpage], UrlGeneratorInterface::ABSOLUTE_URL); + $info="
Votre compte est à présent activé
Vous allez être redirigé vers la mire de connexion puis vers votre groupe de travail
Connexion"; + $this->get('session')->set('registrationinfo', $info); + $this->get('session')->set('registrationredirectto', $url); + $key = Uuid::uuid4(); $usergroup=new UserGroup(); $user=$em->getRepository("CadolesCoreBundle:User")->find($userid); @@ -688,6 +703,7 @@ class RegistrationController extends Controller $mode="info"; $this->get('session')->set('registrationinfo', $info); $this->get('session')->set('registrationmode', $mode); + $this->get('session')->set('registrationredirectto', null); return $this->redirectToRoute('cadoles_core_registration_info'); } @@ -724,6 +740,7 @@ class RegistrationController extends Controller $mode="danger"; $this->get('session')->set('registrationinfo', $info); $this->get('session')->set('registrationmode', $mode); + $this->get('session')->set('registrationredirectto', null); return $this->redirectToRoute('cadoles_core_registration_info'); } else { @@ -783,6 +800,7 @@ class RegistrationController extends Controller $mode="success"; $this->get('session')->set('registrationinfo', $info); $this->get('session')->set('registrationmode', $mode); + $this->get('session')->set('registrationredirectto', null); return $this->redirectToRoute('cadoles_core_registration_info'); } diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/RegistrationType.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/RegistrationType.php index ad8aead0..1b3d9a81 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/RegistrationType.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/RegistrationType.php @@ -110,7 +110,8 @@ class RegistrationType extends AbstractType "type" => PasswordType::class, "required" => ($options["mode"]=="submit"?true:false), "first_options" => array("label" => "Mot de Passe","attr" => array("class" => "form-control", "style" => "margin-bottom:15px", "autocomplete" => "new-password")), - "second_options" => array('label' => 'Confirmer Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")) + "second_options" => array('label' => 'Confirmer Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")), + "invalid_message" => "Mot de passe non valide" ) ); diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/ResetpwdType.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/ResetpwdType.php index e9d96e39..f7e91161 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/ResetpwdType.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/ResetpwdType.php @@ -45,7 +45,8 @@ class ResetpwdType extends AbstractType "required" => ($options["mode"]=="submit"?true:false), "options" => array("always_empty" => true), "first_options" => array("label" => "Votre nouveau Mot de Passe","attr" => array("class" => "form-control", "style" => "margin-bottom:15px")), - "second_options" => array('label' => 'Confirmer votre nouveau Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")) + "second_options" => array('label' => 'Confirmer votre nouveau Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")), + "invalid_message" => "Mot de passe non valide" ) ); } diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/UserType.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/UserType.php index 5a6d8950..7fc87385 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/UserType.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/UserType.php @@ -141,7 +141,8 @@ class UserType extends AbstractType "required" => ($options["mode"]=="submit"?true:false), "options" => array("always_empty" => true), "first_options" => array("label" => "Mot de Passe","attr" => array("class" => "form-control", "style" => "margin-bottom:15px", "autocomplete" => "new-password")), - "second_options" => array('label' => 'Confirmer Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")) + "second_options" => array('label' => 'Confirmer Mot de Passe',"attr" => array("class" => "form-control", "style" => "margin-bottom:15px")), + "invalid_message" => "Mot de passe non valide" ) ); } diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/File/subdirectory.html.twig b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/File/subdirectory.html.twig index 76b2420c..b965eb46 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/File/subdirectory.html.twig +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/File/subdirectory.html.twig @@ -46,7 +46,8 @@ $('document').ready(function(){ {% if toclose %} - parent.location.reload(); + href=parent.location.href; + parent.location.href=href; {% endif %} $("#form_subdirectory").focus(); diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Group/users.html.twig b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Group/users.html.twig index 6d7448a1..b0ef7f1e 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Group/users.html.twig +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Group/users.html.twig @@ -38,7 +38,7 @@