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 @@ Email Visite {% if group.fgcanshare %} - Manager + Permissions {% endif %} @@ -65,7 +65,7 @@ Email Visite {% if group.fgcanshare %} - Manager + Permissions {% endif %} @@ -89,10 +89,10 @@ Permissions - Propriétaire - Gestionnaire - Collaborateur - Utilisateur + Propriétaire
*** + Gestionnaire
** + Collaborateur
* + Utilisateur
  @@ -149,14 +149,14 @@ x - S’inscrire par soit même sur les groupes ouverts + S’inscrire par soi-même sur les groupes ouverts x x x x - Se désinscrire par soit même + Se désinscrire par soi-même x x diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/edit.html.twig b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/edit.html.twig index 0e79038c..ec426bbe 100755 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/edit.html.twig +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/edit.html.twig @@ -110,9 +110,8 @@ {% if form.email is defined %} {{ form_row(form.email) }}

{% endif %} {% if form.visible is defined %} {{ form_row(form.visible) }} {% endif %} diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/info.html.twig b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/info.html.twig index 8343a917..ec8cd65c 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/info.html.twig +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/info.html.twig @@ -18,7 +18,9 @@ $(document).ready(function() { // Redirection vers la mire d'authentification setTimeout(function(){ - {% if mode_auth == "SAML" %} + {% if redirectto is defined and redirectto is not null %} + window.location.href="{{ redirectto }}"; + {% elseif mode_auth == "SAML" %} window.location.href="{{ path("lightsaml_sp.login") }}"; {% elseif mode_auth == "CAS" %} window.location.href="{{ path("cas_sp.login") }}"; @@ -32,6 +34,5 @@ }, 6000); }); {% endif %} - {% endblock %} diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/PagewidgetController.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/PagewidgetController.php index 20803cc6..dfb3b7c6 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/PagewidgetController.php +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/PagewidgetController.php @@ -1526,7 +1526,7 @@ class PagewidgetController extends Controller if($this->usage=="group") { $groupentity=$this->em->getRepository("CadolesCoreBundle:Group")->find($this->group); if($groupentity) { - $title=$groupentity->getLabel(); + $title=$this->entity->getPage()->getName(); $id=$groupentity->getId(); if($groupentity->getDescription()) $description="Description
".$groupentity->getDescription(); diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Page/pages.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Page/pages.html.twig index 0563616d..0db83d96 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Page/pages.html.twig +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Page/pages.html.twig @@ -538,9 +538,10 @@ {% if app.user %} if($("#page-"+idpage).length) { if(pagebookmark==idpage) - confirmtext="Êtes-vous sûr de vouloir enlever cette page comme page d'accueil du portail ?"; + confirmtext="Votre page d'accueil redevient l'accueil général de {{ app.session.get("appname") }}."; else - confirmtext="Êtes-vous sûr de vouloir placer cette page comme page d'accueil du portail ?"; + confirmtext="Cette page sera votre page d'acueil à l'ouverture de {{ app.session.get("appname") }}, vous pourrez à tout moment changer de page d'accueil."; + if (confirm(confirmtext)) { $.ajax({ method: "POST", diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewcalendar.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewcalendar.html.twig index 8b3036d9..f66c8947 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewcalendar.html.twig +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewcalendar.html.twig @@ -37,7 +37,7 @@ {% if usage=="group" and firstcalendar is defined %} {% set url= path('cadoles_portal_'~access~'_calendar_view',{id:firstcalendar}) %} {% endif %} - + {% endif %} {% if look=="list" %} diff --git a/src/ninegate-1.0/src/Cadoles/WebsocketBundle/Resources/views/Chat/client.html.twig b/src/ninegate-1.0/src/Cadoles/WebsocketBundle/Resources/views/Chat/client.html.twig index 916a7d52..10a787d9 100644 --- a/src/ninegate-1.0/src/Cadoles/WebsocketBundle/Resources/views/Chat/client.html.twig +++ b/src/ninegate-1.0/src/Cadoles/WebsocketBundle/Resources/views/Chat/client.html.twig @@ -196,7 +196,7 @@