From 490d8112fa5f5a406b8dbf08cb71fc1aedc5ea69 Mon Sep 17 00:00:00 2001 From: afornerot Date: Mon, 15 Mar 2021 16:19:40 +0100 Subject: [PATCH] ajout d'une note administrateur dans les inscriptions --- .../CoreBundle/Entity/Registration.php | 29 +++++++++++++++++++ .../CoreBundle/Form/RegistrationType.php | 9 ++++++ .../views/Registration/edit.html.twig | 19 +++++++++++- 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Entity/Registration.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Entity/Registration.php index 9f2640d2..8f2cf950 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Entity/Registration.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Entity/Registration.php @@ -143,6 +143,11 @@ class Registration implements UserInterface, \Serializable */ private $motivation; + /** + * @ORM\Column(name="note", type="text", nullable=true) + */ + private $note; + /** * @ORM\Column(type="integer", length=60, nullable=true) */ @@ -840,4 +845,28 @@ class Registration implements UserInterface, \Serializable { return $this->passwordad; } + + /** + * Set note + * + * @param string $note + * + * @return Registration + */ + public function setNote($note) + { + $this->note = $note; + + return $this; + } + + /** + * Get note + * + * @return string + */ + public function getNote() + { + return $this->note; + } } diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/RegistrationType.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/RegistrationType.php index 1528adc2..3678183b 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/RegistrationType.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/RegistrationType.php @@ -45,6 +45,15 @@ class RegistrationType extends AbstractType "attr" => array("class" => "btn btn-success") ) ); + + $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") + ) + ); } # Obligatoire diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/edit.html.twig b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/edit.html.twig index bb0a32a2..636c666d 100755 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/edit.html.twig +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/edit.html.twig @@ -21,7 +21,11 @@ {% endif %} {% if mode!="submit" %} - {% if mode=="send" %} {{ form_widget(form.save) }} {%endif%} + {% if mode=="send" %} + {{ form_widget(form.save) }} + Envoyer un mail + {%endif%} + Annuler {% endif %} @@ -56,6 +60,19 @@ {% endif %}
+ {% if mode=="send" %} +
+
+
+ Notes Administrateur +
+
+ {{ form_widget(form.note) }} +
+
+
+ {%endif%} +