]> Raphaël G. Git Repositories - airbundle/commitdiff
Add user edit forms
authorRaphaël Gertz <git@rapsys.eu>
Wed, 7 Jul 2021 15:19:28 +0000 (17:19 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Wed, 7 Jul 2021 15:19:28 +0000 (17:19 +0200)
Resources/views/form/_user.html.twig [new file with mode: 0644]
Resources/views/user/edit.html.twig [new file with mode: 0644]

diff --git a/Resources/views/form/_user.html.twig b/Resources/views/form/_user.html.twig
new file mode 100644 (file)
index 0000000..3c44d02
--- /dev/null
@@ -0,0 +1,25 @@
+<section>
+       <h2>{% trans %}Modify{% endtrans %}</h2>
+       {{ form_start(forms.user) }}
+               <div>
+                       {% if forms.user.mail is defined %}
+                               {{ form_row(forms.user.mail) }}
+                       {% endif %}
+
+                       {{ form_row(forms.user.civility) }}
+
+                       {{ form_row(forms.user.forename) }}
+
+                       {{ form_row(forms.user.surname) }}
+
+                       {{ form_row(forms.user.pseudonym) }}
+
+                       {{ form_row(forms.user.phone) }}
+
+                       {{ form_row(forms.user.submit) }}
+               </div>
+
+               {# render csrf token etc .#}
+               <footer style="display:none">{{ form_rest(forms.user) }}</footer>
+       {{ form_end(forms.user) }}
+</section>
diff --git a/Resources/views/user/edit.html.twig b/Resources/views/user/edit.html.twig
new file mode 100644 (file)
index 0000000..4ddcbc7
--- /dev/null
@@ -0,0 +1,28 @@
+{% extends '@RapsysAir/body.html.twig' %}
+{% block content %}
+       <section id="form">
+               <h2>{{ section }}</h2>
+               {{ form_start(form) }}
+                       <div>
+                               {% if form.mail is defined %}
+                                       {{ form_row(form.mail) }}
+                               {% endif %}
+
+                               {{ form_row(form.civility) }}
+
+                               {{ form_row(form.forename) }}
+
+                               {{ form_row(form.surname) }}
+
+                               {{ form_row(form.pseudonym) }}
+
+                               {{ form_row(form.phone) }}
+
+                               {{ form_row(form.submit) }}
+                       </div>
+
+                       {# render csrf token etc .#}
+                       <footer style="display:none">{{ form_rest(form) }}</footer>
+               {{ form_end(form) }}
+       </section>
+{% endblock %}