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 1a5f4862..35a7852e 100755 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/RegistrationController.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/RegistrationController.php @@ -508,9 +508,11 @@ class RegistrationController extends Controller $user->setSalt($data[0]->getSalt()); $user->setPasswordDirect($data[0]->getPassword()); $user->setVisible($data[0]->getVisible()); + $user->setMotivation($data[0]->getMotivation()); $user->setNiveau01($data[0]->getNiveau01()); $user->setSiren($data[0]->getNiveau01()->getSiren()); + $user->setNiveau01other($data[0]->getNiveau01other()); $user->setNiveau02($data[0]->getNiveau02()); if($data[0]->getNiveau02()!==null) $user->setSiret($data[0]->getNiveau02()->getSiret()); diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Entity/User.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Entity/User.php index e802e8b8..6d01d7e6 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Entity/User.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Entity/User.php @@ -178,6 +178,11 @@ class User implements UserInterface, \Serializable */ private $niveau01other; + /** + * @ORM\Column(name="description", type="text", nullable=true) + */ + private $motivation; + /** * @ORM\ManyToOne(targetEntity="Country", inversedBy="users") * @ORM\JoinColumn(nullable=true) @@ -1923,4 +1928,28 @@ class User implements UserInterface, \Serializable { return $this->alertreaders; } + + /** + * Set motivation + * + * @param string $motivation + * + * @return User + */ + public function setMotivation($motivation) + { + $this->motivation = $motivation; + + return $this; + } + + /** + * Get motivation + * + * @return string + */ + public function getMotivation() + { + return $this->motivation; + } } 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 e78e5052..53f840c6 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/UserType.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/UserType.php @@ -388,6 +388,15 @@ class UserType extends AbstractType "disabled" => true, ]); } + + $builder->add('motivation', + TextareaType::class, array( + "label" => "Motivation", + "required" => false, + "disabled" => ($options["mode"]=="delete"?true:false), + "attr" => array("class" => "form-control", "style" => "margin-bottom:15px; height: 90px") + ) + ); # Avatar $builder->add('avatar',HiddenType::class, array("empty_data" => "noavatar.png")); diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/User/edit.html.twig b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/User/edit.html.twig index 78714d0a..c7f078d4 100755 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/User/edit.html.twig +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/User/edit.html.twig @@ -106,6 +106,16 @@ +