]> Raphaël G. Git Repositories - airbundle/commitdiff
Add session edit form template
authorRaphaël Gertz <git@rapsys.eu>
Wed, 9 Dec 2020 20:47:09 +0000 (21:47 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Wed, 9 Dec 2020 20:47:09 +0000 (21:47 +0100)
Resources/views/form/_session_edit.html.twig [new file with mode: 0644]

diff --git a/Resources/views/form/_session_edit.html.twig b/Resources/views/form/_session_edit.html.twig
new file mode 100644 (file)
index 0000000..3477a53
--- /dev/null
@@ -0,0 +1,49 @@
+{% if session_edit.modify is defined or session_edit.move is defined or session_edit.cancel is defined or session_edit.raincancel is defined %}
+       <section>
+               <h2>{% trans %}Modify{% endtrans %}</h2>
+               {{ form_start(session_edit) }}
+                       {% if session_edit.modify is defined %}
+                               <div>
+                                       {{ form_row(session_edit.begin) }}
+
+                                       {{ form_row(session_edit.length) }}
+
+                                       {{ form_row(session_edit.modify) }}
+                               </div>
+                       {% endif %}
+                       {% if session_edit.move is defined %}
+                               <div class="dangerous">
+                                       {{ form_row(session_edit.location) }}
+
+                                       {{ form_row(session_edit.move) }}
+                               </div>
+                       {% endif %}
+                       {% if session_edit.cancel is defined or session_edit.raincancel is defined %}
+                               <div class="mortal">
+                                       {% if is_granted('ROLE_ADMIN') %}
+                                               {{ form_row(session_edit.user) }}
+                                       {% endif %}
+
+                                       {% if session_edit.cancel is defined %}
+                                               {{ form_row(session_edit.cancel) }}
+                                       {% endif %}
+
+                                       {% if session_edit.raincancel is defined %}
+                                               {{ form_row(session_edit.raincancel) }}
+                                       {% endif %}
+
+                                       {% if is_granted('ROLE_ADMIN') %}
+
+                                               {{ form_row(session_edit.attribute) }}
+
+                                               {{ form_row(session_edit.autoattribute) }}
+
+                                               {{ form_row(session_edit.lock) }}
+                                       {% endif %}
+                               </div>
+                       {% endif %}
+                       {# render csrf token etc .#}
+                       <footer style="display:none">{{ form_rest(session_edit) }}</footer>
+               {{ form_end(session_edit) }}
+       </section>
+{% endif %}