Merge branch 'master' into dist/envole/6/master
This commit is contained in:
commit
e03af01666
@ -179,7 +179,9 @@ class GroupController extends Controller
|
||||
}
|
||||
else {
|
||||
$fgproprio=($user==$data->getOwner());
|
||||
$fgmanager=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findOneBy(["user"=>$this->getUser(),"group"=>$data])->getFgmanager();
|
||||
$fgmanager=false;
|
||||
$usergroup=$this->getDoctrine()->getRepository("CadolesCoreBundle:UserGroup")->findOneBy(["user"=>$this->getUser(),"group"=>$data]);
|
||||
if($usergroup) $fgmanager=$usergroup->getFgmanager();
|
||||
|
||||
// Modification possible uniquement si l'utilisateur est propriétaire du groupe
|
||||
if($fgproprio) {
|
||||
@ -570,7 +572,7 @@ class GroupController extends Controller
|
||||
"body_text"=>$text
|
||||
);
|
||||
$to = $user->getEmail();
|
||||
$from = $this->getParameter('noreply');;
|
||||
$from = $this->getParameter('noreply');
|
||||
$fromName = $this->get('session')->get('appname');
|
||||
$message = $this->container->get('cadoles.core.service.mail');
|
||||
$message->sendEmail($template, $mail_params, $to, $from, $fromName);
|
||||
@ -750,7 +752,7 @@ class GroupController extends Controller
|
||||
$form->handleRequest($request);
|
||||
|
||||
// Sur erreur
|
||||
$this->getErrorForm(null,$form,$request,$data,"submit");
|
||||
$this->getErrorForm(null,$form,$request,$data,"submit",$access);
|
||||
|
||||
// Sur validation
|
||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
||||
@ -804,6 +806,8 @@ class GroupController extends Controller
|
||||
// Récupération de l'enregistrement courant
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$data=$this->getData($id);
|
||||
$oldowner=$data->getOwner();
|
||||
|
||||
$this->canOwner($data,$access);
|
||||
|
||||
// Création du formulaire
|
||||
@ -822,7 +826,7 @@ class GroupController extends Controller
|
||||
$form->handleRequest($request);
|
||||
|
||||
// Sur erreur
|
||||
$this->getErrorForm($id,$form,$request,$data,"update");
|
||||
$this->getErrorForm($id,$form,$request,$data,"update",$access);
|
||||
|
||||
// Sur validation
|
||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
||||
@ -850,6 +854,23 @@ class GroupController extends Controller
|
||||
// Sinon on les génère
|
||||
$this->ctrlFgcanshare($data,$access);
|
||||
|
||||
// Si le propriétaire change de main on prévient le nouveau propriétaire
|
||||
if($data->getOwner()&&$data->getOwner()!=$oldowner) {
|
||||
// Email à destination de l'inscript pour le prévenir qu'un administrateur doit valider
|
||||
$text="On vient de vous tranférer la propriété du groupe ".$data->getLabel();
|
||||
$template="template";
|
||||
$mail_params=array(
|
||||
"subject" => $this->get('session')->get('appname')." : Transfert de groupe",
|
||||
"body_html"=>nl2br($text),
|
||||
"body_text"=>$text
|
||||
);
|
||||
$to = $data->getOwner()->getEmail();
|
||||
$from = $this->getParameter('noreply');
|
||||
$fromName = $this->get('session')->get('appname');
|
||||
$message = $this->container->get('cadoles.core.service.mail');
|
||||
$message->sendEmail($template, $mail_params, $to, $from, $fromName);
|
||||
}
|
||||
|
||||
// Retour à la liste
|
||||
return $this->redirectToRoute("cadoles_core_".$access."_group");
|
||||
}
|
||||
@ -901,7 +922,7 @@ class GroupController extends Controller
|
||||
$form->handleRequest($request);
|
||||
|
||||
// Sur erreur
|
||||
$this->getErrorForm($id,$form,$request,$data,"delete");
|
||||
$this->getErrorForm($id,$form,$request,$data,"delete",$access);
|
||||
|
||||
// Sur validation
|
||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
||||
@ -1163,6 +1184,11 @@ class GroupController extends Controller
|
||||
}
|
||||
$pages=$group->getPages();
|
||||
$this->idpage=$pages[0]->getId();
|
||||
if($pages[0]->getName()!=$group->getLabel()) {
|
||||
$pages[0]->setName($group->getLabel());
|
||||
$em->persist($pages[0]);
|
||||
$em->flush();
|
||||
}
|
||||
|
||||
// On regarde s'il a au moins un calendrier
|
||||
if($group->getCalendars()->isEmpty()) {
|
||||
@ -1179,6 +1205,14 @@ class GroupController extends Controller
|
||||
$em->persist($calendar);
|
||||
$em->flush();
|
||||
}
|
||||
else {
|
||||
$calendars=$group->getCalendars();
|
||||
if($calendars[0]->getName()!=$group->getLabel()) {
|
||||
$calendars[0]->setName($group->getLabel());
|
||||
$em->persist($calendars[0]);
|
||||
$em->flush();
|
||||
}
|
||||
}
|
||||
|
||||
// On regarde s'il a au moins un blog
|
||||
if($group->getBlogs()->isEmpty()) {
|
||||
@ -1190,7 +1224,15 @@ class GroupController extends Controller
|
||||
|
||||
$em->persist($blog);
|
||||
$em->flush();
|
||||
}
|
||||
}
|
||||
else {
|
||||
$blogs=$group->getBlogs();
|
||||
if($blogs[0]->getName()!=$group->getLabel()) {
|
||||
$blogs[0]->setName($group->getLabel());
|
||||
$em->persist($blogs[0]);
|
||||
$em->flush();
|
||||
}
|
||||
}
|
||||
|
||||
// On regarde s'il a au moins un project
|
||||
if($group->getProjects()->isEmpty()) {
|
||||
@ -1202,7 +1244,15 @@ class GroupController extends Controller
|
||||
|
||||
$em->persist($project);
|
||||
$em->flush();
|
||||
}
|
||||
}
|
||||
else {
|
||||
$projects=$group->getProjects();
|
||||
if($projects[0]->getName()!=$group->getLabel()) {
|
||||
$projects[0]->setName($group->getLabel());
|
||||
$em->persist($projects[0]);
|
||||
$em->flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1239,7 +1289,7 @@ class GroupController extends Controller
|
||||
else return true;
|
||||
}
|
||||
|
||||
protected function getErrorForm($id,$form,$request,$data,$mode) {
|
||||
protected function getErrorForm($id,$form,$request,$data,$mode,$access) {
|
||||
if ($form->get('submit')->isClicked()&&$mode=="delete") {
|
||||
|
||||
}
|
||||
@ -1262,6 +1312,10 @@ class GroupController extends Controller
|
||||
$form->addError(new FormError("Un groupe de travail doit avoir un modèle de page d'accueil"));
|
||||
}
|
||||
|
||||
if ($form->get('submit')->isClicked() && $mode=="update" && $access=="user") {
|
||||
if(!$data->getOwner()) $form->addError(new FormError('Le propriétaire du groupe est obligatoire'));
|
||||
}
|
||||
|
||||
if ($form->get('submit')->isClicked() && !$form->isValid()) {
|
||||
$this->get('session')->getFlashBag()->clear();
|
||||
$validator = $this->get('validator');
|
||||
|
@ -58,26 +58,28 @@ class GroupType extends AbstractType
|
||||
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px","readonly" => ($options["mode"]=="delete"?true:false))
|
||||
]);
|
||||
|
||||
$builder->add('owner',
|
||||
Select2EntityType::class, array(
|
||||
'label' => "Propriétaire",
|
||||
'disabled' => ($options["mode"]=="delete"?true:false),
|
||||
"required" => false,
|
||||
'multiple' => false,
|
||||
'remote_route' => 'cadoles_core_config_user_ajax_selectlist',
|
||||
'class' => 'Cadoles\coreBundle\Entity\User',
|
||||
'primary_key' => 'id',
|
||||
'text_property' => 'username',
|
||||
'minimum_input_length' => 2,
|
||||
'page_limit' => 10,
|
||||
'allow_clear' => true,
|
||||
'delay' => 250,
|
||||
'cache' => false,
|
||||
'cache_timeout' => 60000, // if 'cache' is true
|
||||
'language' => 'fr',
|
||||
'placeholder' => 'Selectionner un propriétaire',
|
||||
'attr' => array("class" => "form-control", "style" => "margin-bottom:15px")
|
||||
));
|
||||
if($options["access"]=="config" || $options["mode"] == "update") {
|
||||
$builder->add('owner',
|
||||
Select2EntityType::class, array(
|
||||
'label' => "Propriétaire",
|
||||
'disabled' => ($options["mode"]=="delete"?true:false),
|
||||
"required" => false,
|
||||
'multiple' => false,
|
||||
'remote_route' => 'cadoles_core_'.$options["access"].'_user_ajax_selectlist',
|
||||
'class' => 'Cadoles\coreBundle\Entity\User',
|
||||
'primary_key' => 'id',
|
||||
'text_property' => 'username',
|
||||
'minimum_input_length' => 2,
|
||||
'page_limit' => 10,
|
||||
'allow_clear' => true,
|
||||
'delay' => 250,
|
||||
'cache' => false,
|
||||
'cache_timeout' => 60000, // if 'cache' is true
|
||||
'language' => 'fr',
|
||||
'placeholder' => 'Selectionner un propriétaire',
|
||||
'attr' => array("class" => "form-control", "style" => "margin-bottom:15px")
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
if($options["access"]=="config") {
|
||||
|
@ -286,6 +286,10 @@ cadoles_core_user_user_ajax_list:
|
||||
path: /user/user/ajax/list
|
||||
defaults: { _controller: CadolesCoreBundle:User:ajaxlist, access: user }
|
||||
|
||||
cadoles_core_user_user_ajax_selectlist:
|
||||
path: /user/user/ajax/selectlist
|
||||
defaults: { _controller: CadolesCoreBundle:User:selectlist, access: user }
|
||||
|
||||
cadoles_core_user_users:
|
||||
path: /user/users
|
||||
defaults: { _controller: CadolesCoreBundle:User:list, access: user }
|
||||
|
@ -1894,148 +1894,148 @@ function AdminIcon() {
|
||||
$(document).on('ready', function(){
|
||||
var url = document.location.href;
|
||||
if (new RegExp("ninegate/user/group/submit$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='MyTourGroupe()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='MyTourGroupe()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/user/users$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='MyTourUsers()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='MyTourUsers()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/user$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='MyTourUser()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='MyTourUser()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/user/group$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='Groups()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='Groups()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp(/ninegate\/user\/group\/update\/\d+$/).test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='MyTourGroupe()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='MyTourGroupe()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp(/ninegate\/user\/group\/users\/\d+$/).test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='MyTourGroupUsers()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='MyTourGroupUsers()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp(/ninegate\/config\/group\/users\/\d+$/).test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='MyTourGroupUsers()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='MyTourGroupUsers()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/user/page/submit").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='MyTourPage()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='MyTourPage()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/commun$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminCommun()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminCommun()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/home$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminHome()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminHome()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/theme$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminTheme()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminTheme()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/commun/permmodo$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminPermmodo()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminPermmodo()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/commun/datauser$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminDatauser()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminDatauser()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/commun/datausers$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminDatausers()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminDatausers()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/whitelist$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminWhitelist()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminWhitelist()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/niveau01$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminServices()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminServices()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/niveau02$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminEtablissements()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminEtablissements()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/group$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminGroup()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminGroup()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/group/submit$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminGroupSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminGroupSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/registration$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminRegistration()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminRegistration()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/user$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminUser()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminUser()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/importuser$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminImportuser()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminImportuser()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/template$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminTemplate()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminTemplate()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/template/submit$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminTemplateSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminTemplateSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp (/ninegate\/config\/template\/view\/\d+$/).test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminTemplateView()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminTemplateView()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp (/ninegate\/config\/template\/update\/\d+$/).test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminTemplateUpdate()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminTemplateUpdate()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/page$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminPage()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminPage()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/page/submit$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminPageSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminPageSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp (/ninegate\/config\/page\/view\/\d+$/).test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminPageView()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminPageView()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp (/ninegate\/config\/page\/update\/\d+$/).test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminPageUpdate()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminPageUpdate()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/item$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminItem()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminItem()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/item/submit$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminItemSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminItemSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp(/ninegate\/config\/item\/update\/\d+$/).test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminItemSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminItemSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/alert$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminAlert()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminAlert()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/alert/submit$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminAlertSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminAlertSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp(/ninegate\/config\/alert\/update\/\d+$/).test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminAlertSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminAlertSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/calendar$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminCalendar()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminCalendar()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/calendar/submit$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminCalendarSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminCalendarSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/blog$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminBlog()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminBlog()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/blog/submit$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminBlogSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminBlogSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/flux$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminFlux()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminFlux()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/flux/submit$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminFluxSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminFluxSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp(/ninegate\/config\/flux\/update\/\d+$/).test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminFluxSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminFluxSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/notice$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminNotice()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminNotice()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/notice/submit$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminNoticeSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminNoticeSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp(/ninegate\/config\/notice\/update\/\d+$/).test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminNoticeSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminNoticeSubmit()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
else if (new RegExp("ninegate/config/icon$").test(url)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='AdminIcon()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='AdminIcon()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
// Instance the Tour
|
||||
else if($("#menu-annuaire".length)) {
|
||||
$("<li><a title='Aide' style='cursor:pointer'><i onClick='MyTour()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
$("<li><a title='Aide embarquée' style='cursor:pointer'><i onClick='MyTour()' class='fa fa-question fa-fw'></i></a></li>").insertBefore($("#menu-annuaire"));
|
||||
}
|
||||
});
|
||||
|
@ -10,13 +10,13 @@
|
||||
|
||||
<li>
|
||||
{% if mode_auth == "SAML" %}
|
||||
<a href="{{ url('cadoles_core_kill') }}"><i class="fa fa-sign-out fa-fw"></i></a>
|
||||
<a href="{{ url('cadoles_core_kill') }}" title="Déconnexion"><i class="fa fa-sign-out fa-fw"></i></a>
|
||||
{% elseif mode_auth == "CAS" %}
|
||||
<a href="{{ path('cas_sp.logout') }}"><i class="fa fa-sign-out fa-fw"></i></a>
|
||||
<a href="{{ path('cas_sp.logout') }}" title="Déconnexion"><i class="fa fa-sign-out fa-fw"></i></a>
|
||||
{% elseif mode_auth == "SQL" %}
|
||||
<a href="{{ path('cadoles_core_kill') }}"><i class="fa fa-sign-out fa-fw"></i></a>
|
||||
<a href="{{ path('cadoles_core_kill') }}" title="Déconnexion"><i class="fa fa-sign-out fa-fw"></i></a>
|
||||
{% elseif mode_auth == "LDAP" %}
|
||||
<a href="{{ path('cadoles_core_kill') }}"><i class="fa fa-sign-out fa-fw"></i></a>
|
||||
<a href="{{ path('cadoles_core_kill') }}" title="Déconnexion"><i class="fa fa-sign-out fa-fw"></i></a>
|
||||
{% endif %}
|
||||
</li>
|
||||
|
||||
@ -30,13 +30,13 @@
|
||||
|
||||
<li>
|
||||
{% if mode_auth == "SAML" %}
|
||||
<a href="{{ path('lightsaml_sp.login') }}"><i class="fa fa-sign-in fa-fw"></i></a>
|
||||
<a href="{{ path('lightsaml_sp.login') }}" title="Connexion"><i class="fa fa-sign-in fa-fw"></i></a>
|
||||
{% elseif mode_auth == "CAS" %}
|
||||
<a href="{{ path('cas_sp.login') }}"><i class="fa fa-sign-in fa-fw"></i></a>
|
||||
<a href="{{ path('cas_sp.login') }}" title="Connexion"><i class="fa fa-sign-in fa-fw"></i></a>
|
||||
{% elseif mode_auth == "SQL" %}
|
||||
<a href="{{ path('cadoles_core_login') }}"><i class="fa fa-sign-in fa-fw"></i></a>
|
||||
<a href="{{ path('cadoles_core_login') }}" title="Connexion"><i class="fa fa-sign-in fa-fw"></i></a>
|
||||
{% elseif mode_auth == "LDAP" %}
|
||||
<a href="{{ path('cadoles_core_ldap_login') }}"><i class="fa fa-sign-in fa-fw"></i></a>
|
||||
<a href="{{ path('cadoles_core_ldap_login') }}" title="Connexion"><i class="fa fa-sign-in fa-fw"></i></a>
|
||||
{% endif %}
|
||||
|
||||
</li>
|
||||
|
@ -67,9 +67,9 @@
|
||||
{{ form_widget(form.username) }}
|
||||
|
||||
<div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top: -10px;'>
|
||||
Caractères interdits = accent, espace, caractères spéciaux sauf @ . - _<br>
|
||||
Formatez votre login sous la forme prenom.nom dans la mesure du possible<br>
|
||||
Taille minimum = 5 caractères<br>
|
||||
Formatez votre login sous la forme prenom.nom dans la mesure du possible
|
||||
Caractères interdits = accent, espace, caractères spéciaux sauf @ . - _<br>
|
||||
</div>
|
||||
|
||||
{% if form.password is defined %}
|
||||
|
@ -74,9 +74,9 @@
|
||||
{{ form_widget(form.username) }}
|
||||
|
||||
<div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top: -10px;'>
|
||||
Caractères interdits = accent, espace, caractères spéciaux sauf @ . - _<br>
|
||||
Formatez votre login sous la forme prenom.nom dans la mesure du possible<br>
|
||||
Taille minimum = 5 caractères<br>
|
||||
Formatez votre login sous la forme prenom.nom dans la mesure du possible
|
||||
Caractères interdits = accent, espace, caractères spéciaux sauf @ . - _<br>
|
||||
</div>
|
||||
|
||||
{% if form.password is defined %}
|
||||
|
@ -59,7 +59,7 @@ class PagewidgetController extends Controller
|
||||
'param' => $params,
|
||||
'mode' => "update",
|
||||
'access' => $access,
|
||||
'idicon' => $entity->getIcon()->getId(),
|
||||
'idicon' => ($entity->getIcon()?$entity->getIcon()->getId():$widgettype->getIcon()->getId()),
|
||||
'method' => 'POST',
|
||||
]);
|
||||
} else {
|
||||
|
@ -45,6 +45,7 @@ class ProjecttaskType extends AbstractType
|
||||
->add('priority', IntegerType::class, [
|
||||
"label" => 'Priorité',
|
||||
"required" => true,
|
||||
"attr" => ["min"=>0],
|
||||
])
|
||||
|
||||
->add('end', DateType::class, [
|
||||
@ -56,6 +57,7 @@ class ProjecttaskType extends AbstractType
|
||||
->add('percentage', IntegerType::class, [
|
||||
"label" => "Pourcentage d'avancement",
|
||||
"required" => true,
|
||||
"attr" => ["min"=>0, "max"=>100],
|
||||
])
|
||||
|
||||
->add('projecttasktag', EntityType::class, [
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
<div style="margin:10px 0px 10px 0px; text-align:left; display:inline-block;width:49%">
|
||||
{% if not idpage is empty %}
|
||||
<a href="{{path('cadoles_portal_user_page_view',{id:idpage,usage:'group',group:idgroup})}}" class="btn btn-default">Revenir sur le Groupe</a>
|
||||
<a href="{{path('cadoles_portal_user_page_view',{id:idpage,usage:'group',group:idgroup})}}" class="btn btn-success">Revenir sur le Groupe</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@ -131,7 +131,7 @@
|
||||
{{ projecttask.user.username }}
|
||||
{% endif %}
|
||||
<br>Crée le {{ projecttask.submit|date("d/m/Y à H:i") }}
|
||||
<br>Dans le project {{projecttask.project.name }}</small>
|
||||
<br>Dans le projet {{projecttask.project.name }}</small>
|
||||
</div>
|
||||
|
||||
<div class="pull-right" style="width:80px; margin:5px 5px 0px 0px; text-align: center;">
|
||||
|
@ -37,7 +37,7 @@
|
||||
{% else %}
|
||||
<div style="margin:10px 0px 10px 0px; text-align:left; display:inline-block;width:49%">
|
||||
{% if not idpage is empty %}
|
||||
<a href="{{path('cadoles_portal_user_page_view',{id:idpage,usage:'group',group:idgroup})}}" class="btn btn-default">Revenir sur le Groupe</a>
|
||||
<a href="{{path('cadoles_portal_user_page_view',{id:idpage,usage:'group',group:idgroup})}}" class="btn btn-success">Revenir sur le Groupe</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
@ -94,11 +94,11 @@
|
||||
<div id="topchat" class='row'>
|
||||
{{ form_widget(form.message) }}
|
||||
<input id="sendbymail" type="checkbox" style="float:right" class='switch' ></input>
|
||||
<label class="custom-control-label" for="sendbymail" style="color:#{{ colorbodyback }}">Envoyer par Mail ?</label>
|
||||
<label class="custom-control-label" for="sendbymail" style="color:#{{ colorbodyfont }}">Envoyer par Mail ?</label>
|
||||
<a id="sendbtn" class="btn btn-success" style="margin-top:5px; width:100%; margin-bottom:15px">Envoyer</a>
|
||||
<div id="useronline" style="margin-bottom:10px"></div>
|
||||
<input id="unsee" type="checkbox" style="float:right" class='switch' onChange="switchsee()"></input>
|
||||
<label class="custom-control-label" for="unsee" style="color:#{{ colorbodyback }}">Afficher les messages masqués ?</label>
|
||||
<label class="custom-control-label" for="unsee" style="color:#{{ colorbodyfont }}">Afficher les messages masqués ?</label>
|
||||
</div>
|
||||
|
||||
|
||||
@ -734,9 +734,9 @@
|
||||
|
||||
function addOnline(userid, useravatar, userlastname, userfirstname) {
|
||||
if(!$("#online"+userid).length) {
|
||||
html = "<span id='online"+userid+"' style='width:70px; height:105px; display:inline-block; text-align: center; font-size: 10px; color:#{{ colorbodyback }}; text-transform: uppercase; line-height:11px;overflow-wrap: break-word;vertical-align:top;'>";
|
||||
html = "<span id='online"+userid+"' style='width:70px; display:inline-block; text-align: center; font-size: 10px; color:#{{ colorbodyback }}; text-transform: uppercase; line-height:11px;overflow-wrap: break-word;vertical-align:top;'>";
|
||||
html+= "<img style='cursor:pointer; width:40px; height:40px; margin-bottom:5px;' onclick='seeUser("+userid+")' title='"+userlastname+" "+userfirstname+"' id='user_avatar_img' src='/{{ alias }}/uploads/avatar/"+useravatar+"' class='avatar'>";
|
||||
html+= userlastname+" "+userfirstname;
|
||||
html+= "<span style='color:#{{colorbodyfont}}'>"+userlastname+" "+userfirstname+"</span>";
|
||||
html+= "</span>";
|
||||
$("#useronline").append(html);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user