diff --git a/src/Controller/Admin/MemberCrud.php b/src/Controller/Admin/MemberCrud.php index 12ae370..0527986 100644 --- a/src/Controller/Admin/MemberCrud.php +++ b/src/Controller/Admin/MemberCrud.php @@ -186,6 +186,7 @@ public function configureFields(string $pageName): iterable ->setFormat(DateTimeField::FORMAT_SHORT) ->hideOnIndex(), AssociationField::new('workGroups', 'Werkgroepen'), + TextField::new('comments', 'Extra informatie'), ]; if (in_array('ROLE_ADMIN', $this->getUser()->getRoles(), true)) { diff --git a/src/Entity/Member.php b/src/Entity/Member.php index 7677b1d..8a8cb11 100644 --- a/src/Entity/Member.php +++ b/src/Entity/Member.php @@ -173,6 +173,11 @@ class Member implements UserInterface { */ private bool $acceptUsePersonalInformation = true; + /** + * @ORM\Column(type="text", nullable=true) + */ + private ?string $comments = null; + public function __construct() { $this->registrationTime = new DateTime; $this->contributionPayments = new ArrayCollection; @@ -340,6 +345,10 @@ public function setCurrentMembershipStatus(?MembershipStatus $membershipStatus) $this->currentMembershipStatus = $membershipStatus; } + + public function getComments(): ?string { return $this->comments; } + public function setComments(?string $comments): void { $this->comments = $comments; } + /** @see UserInterface */ public function getUsername(): string { return $this->id; } diff --git a/src/Form/MemberDetailsType.php b/src/Form/MemberDetailsType.php index 205a040..b63d94f 100644 --- a/src/Form/MemberDetailsType.php +++ b/src/Form/MemberDetailsType.php @@ -26,6 +26,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ->add('dateOfBirth', null, ['widget' => 'single_text']) ->add('city') ->add('postCode') + ->add('comments') ; } diff --git a/templates/user/details.html.twig b/templates/user/details.html.twig index f425931..4a3aa9c 100644 --- a/templates/user/details.html.twig +++ b/templates/user/details.html.twig @@ -69,6 +69,11 @@ {{ form_widget(form.division, { attr: { class: 'text-input' }}) }} +