copy des notes registration dans user (ref #241)

This commit is contained in:
afornerot 2021-03-15 17:07:48 +01:00
parent 57606ce0d5
commit b2c78b523a
5 changed files with 61 additions and 10 deletions

View File

@ -509,6 +509,7 @@ class RegistrationController extends Controller
$user->setPasswordDirect($data[0]->getPassword());
$user->setVisible($data[0]->getVisible());
$user->setMotivation($data[0]->getMotivation());
$user->setNote($data[0]->getNote());
$user->setNiveau01($data[0]->getNiveau01());
$user->setSiren($data[0]->getNiveau01()->getSiren());

View File

@ -195,7 +195,12 @@ class User implements UserInterface, \Serializable
* @ORM\Column(name="motivation", type="text", nullable=true)
*/
private $motivation;
/**
* @ORM\Column(name="note", type="text", nullable=true)
*/
private $note;
/**
* @ORM\Column(name="preference", type="array", nullable=true)
*/
@ -2059,4 +2064,28 @@ class User implements UserInterface, \Serializable
{
return $this->passwordad;
}
/**
* Set note
*
* @param string $note
*
* @return User
*/
public function setNote($note)
{
$this->note = $note;
return $this;
}
/**
* Get note
*
* @return string
*/
public function getNote()
{
return $this->note;
}
}

View File

@ -47,13 +47,13 @@ class RegistrationType extends AbstractType
);
$builder->add('note',
TextareaType::class, array(
"label" => "Notes Administrateur",
"required" => false,
"disabled" => ($options["mode"]=="delete"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px; height: 130px")
)
);
TextareaType::class, array(
"label" => "Notes Administrateur",
"required" => false,
"disabled" => ($options["mode"]=="delete"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px; height: 130px")
)
);
}
# Obligatoire

View File

@ -85,7 +85,16 @@ class UserType extends AbstractType
"required" => false,
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px;$readonly","onfocus" => $onfocus, "onchange" => $onchange),
]
);
);
$builder->add('note',
TextareaType::class, array(
"label" => "Notes Administrateur",
"required" => false,
"disabled" => ($options["mode"]=="delete"?true:false),
"attr" => array("class" => "form-control", "style" => "margin-bottom:15px; height: 130px")
)
);
}
$perm=$options["perm"];

View File

@ -63,6 +63,19 @@
<a class="btn btn-info" style="width:100%; margin-bottom:15px;" data-toggle="modal" data-target="#mymodal" onClick="ModalLoad('mymodal','Avatar','{{ path('cadoles_core_crop01') }}');" title='Ajouter un avatar'>Modifier</a>
</div>
{% if access=="config" %}
<div class="col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-key fa-fw"></i> Notes Administrateur
</div>
<div class="panel-body">
{{ form_widget(form.note) }}
</div>
</div>
</div>
{%endif%}
<div class="col-sm-6">
<div class="panel panel-primary">
<div class="panel-heading">
@ -175,7 +188,6 @@
<td><a style="cursor:pointer" title="Se Désinscrire"><i class="fa fa-sign-out-alt fa-fw" onclick="removeLinkGroup({{ group.group.id }})"></i></a></td>
{% else %}
<td>
{{ group.group.id }}
</td>
{% endif %}