motivation sur la fiche user + report motivation/autres de inscription à user (ref #177)

This commit is contained in:
afornerot 2020-09-17 15:30:01 +02:00
parent 6c00001075
commit e92e972c5a
4 changed files with 50 additions and 0 deletions

View File

@ -508,9 +508,11 @@ class RegistrationController extends Controller
$user->setSalt($data[0]->getSalt()); $user->setSalt($data[0]->getSalt());
$user->setPasswordDirect($data[0]->getPassword()); $user->setPasswordDirect($data[0]->getPassword());
$user->setVisible($data[0]->getVisible()); $user->setVisible($data[0]->getVisible());
$user->setMotivation($data[0]->getMotivation());
$user->setNiveau01($data[0]->getNiveau01()); $user->setNiveau01($data[0]->getNiveau01());
$user->setSiren($data[0]->getNiveau01()->getSiren()); $user->setSiren($data[0]->getNiveau01()->getSiren());
$user->setNiveau01other($data[0]->getNiveau01other());
$user->setNiveau02($data[0]->getNiveau02()); $user->setNiveau02($data[0]->getNiveau02());
if($data[0]->getNiveau02()!==null) $user->setSiret($data[0]->getNiveau02()->getSiret()); if($data[0]->getNiveau02()!==null) $user->setSiret($data[0]->getNiveau02()->getSiret());

View File

@ -178,6 +178,11 @@ class User implements UserInterface, \Serializable
*/ */
private $niveau01other; private $niveau01other;
/**
* @ORM\Column(name="description", type="text", nullable=true)
*/
private $motivation;
/** /**
* @ORM\ManyToOne(targetEntity="Country", inversedBy="users") * @ORM\ManyToOne(targetEntity="Country", inversedBy="users")
* @ORM\JoinColumn(nullable=true) * @ORM\JoinColumn(nullable=true)
@ -1923,4 +1928,28 @@ class User implements UserInterface, \Serializable
{ {
return $this->alertreaders; 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;
}
} }

View File

@ -388,6 +388,15 @@ class UserType extends AbstractType
"disabled" => true, "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 # Avatar
$builder->add('avatar',HiddenType::class, array("empty_data" => "noavatar.png")); $builder->add('avatar',HiddenType::class, array("empty_data" => "noavatar.png"));

View File

@ -106,6 +106,16 @@
</div> </div>
</div> </div>
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-pencil fa-fw"></i> Motivations
</div>
<div class="panel-body">
{{ form_row(form.motivation) }}
</div>
</div>
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-sitemap fa-fw"></i> Organisation <i class="fa fa-sitemap fa-fw"></i> Organisation