From 8c908f2c5dfe7dcbf431b35a46ae851a067b766c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Sat, 28 Aug 2021 10:27:45 +0200 Subject: [PATCH 1/1] Optionalize all fields Add slug field --- Resources/views/user/edit.html.twig | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/Resources/views/user/edit.html.twig b/Resources/views/user/edit.html.twig index 4ddcbc7..18637f9 100644 --- a/Resources/views/user/edit.html.twig +++ b/Resources/views/user/edit.html.twig @@ -8,15 +8,29 @@ {{ form_row(form.mail) }} {% endif %} - {{ form_row(form.civility) }} + {% if form.civility is defined %} + {{ form_row(form.civility) }} + {% endif %} - {{ form_row(form.forename) }} + {% if form.forename is defined %} + {{ form_row(form.forename) }} + {% endif %} - {{ form_row(form.surname) }} + {% if form.surname is defined %} + {{ form_row(form.surname) }} + {% endif %} - {{ form_row(form.pseudonym) }} + {% if form.pseudonym is defined %} + {{ form_row(form.pseudonym) }} + {% endif %} - {{ form_row(form.phone) }} + {% if form.slug is defined %} + {{ form_row(form.slug) }} + {% endif %} + + {% if form.phone is defined %} + {{ form_row(form.phone) }} + {% endif %} {{ form_row(form.submit) }} -- 2.41.1