From 234d92d1d7441f5076f01308f1d4f7faad002dd7 Mon Sep 17 00:00:00 2001 From: Enzo Simonnet <enzosim@laposte.net> Date: Tue, 3 Oct 2023 15:49:48 +0200 Subject: [PATCH] Conditions d'utilisation --- src/Command/AccountCreationStudentCommand.php | 8 ++++---- src/Form/RegistrationFormType.php | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Command/AccountCreationStudentCommand.php b/src/Command/AccountCreationStudentCommand.php index 417c074..11f1249 100644 --- a/src/Command/AccountCreationStudentCommand.php +++ b/src/Command/AccountCreationStudentCommand.php @@ -95,14 +95,14 @@ class AccountCreationStudentCommand extends Command $user->setActivePersonalStats(true); // Ajout au groupe correspondant - /*$correctGroup = $this->em->getRepository(Group::class)->findOneBy(['name' => $data[5]]); // TODO (ou 4 peut-être) + changer le nom du groupe en fonction + $correctGroup = $this->em->getRepository(Group::class)->findOneBy(['name' => $data[4]]); // TODO changer le nom du groupe dans le CSV $groupMembership = new GroupMembership(); $groupMembership->setGroup($correctGroup); //$groupMembership->setUser($user); - $groupMembership->setRole(GroupMembership::ROLE_CONTRIBUTOR); // TODO : changer le rôle en fonction de collab ou nonCollab - // $groupMembership->setRole(GroupMembership::ROLE_READER); - $correctGroup->addGroupMembership($groupMembership);*/ + // $groupMembership->setRole(GroupMembership::ROLE_CONTRIBUTOR); // TODO : changer le rôle en fonction de collab ou nonCollab + $groupMembership->setRole(GroupMembership::ROLE_READER); + $correctGroup->addGroupMembership($groupMembership); // Persist the user entity and Flush the changes to the database diff --git a/src/Form/RegistrationFormType.php b/src/Form/RegistrationFormType.php index 6f7bcfc..1de1587 100644 --- a/src/Form/RegistrationFormType.php +++ b/src/Form/RegistrationFormType.php @@ -25,7 +25,8 @@ class RegistrationFormType extends AbstractType ->add('pseudo') ->add('agreeTerms', CheckboxType::class, [ 'mapped' => false, - 'label' => "J'accepte les conditions d'utilisations", + 'label' => "J'accepte les <a href='https://wiki.lezinter.net/_/LexgaMe:BaLex/Conditions_d%27utilisation'>conditions d'utilisation</a>", + 'label_html' => true, // Enable HTML in the labels 'constraints' => [ new IsTrue([ 'message' => "Veuillez accepter les conditions d'utilisation.", -- GitLab