]> Raphaël G. Git Repositories - airbundle/commitdiff
Optionalize all fields
authorRaphaël Gertz <git@rapsys.eu>
Sat, 28 Aug 2021 08:27:45 +0000 (10:27 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Sat, 28 Aug 2021 08:27:45 +0000 (10:27 +0200)
Add slug field

Resources/views/user/edit.html.twig

index 4ddcbc7e29226ac7655581c8a3b7529acc377d5d..18637f98546ef1e8293e6d79f43fc56d38fe48df 100644 (file)
@@ -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) }}
                        </div>