From 107d18f5dc7543819992386985e45be108d756b5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Sun, 13 Dec 2020 22:56:41 +0100 Subject: [PATCH] Contextualize buttons --- Resources/views/form/_session_edit.html.twig | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Resources/views/form/_session_edit.html.twig b/Resources/views/form/_session_edit.html.twig index 3477a53..4c6c368 100644 --- a/Resources/views/form/_session_edit.html.twig +++ b/Resources/views/form/_session_edit.html.twig @@ -1,4 +1,4 @@ -{% if session_edit.modify is defined or session_edit.move is defined or session_edit.cancel is defined or session_edit.raincancel is defined %} +{% if session_edit.modify is defined or session_edit.move is defined or session_edit.cancel is defined or session_edit.raincancel is defined or session_edit.forcecancel is defined or is_granted('ROLE_ADMIN') %}

{% trans %}Modify{% endtrans %}

{{ form_start(session_edit) }} @@ -18,7 +18,7 @@ {{ form_row(session_edit.move) }} {% endif %} - {% if session_edit.cancel is defined or session_edit.raincancel is defined %} + {% if session_edit.cancel is defined or session_edit.raincancel is defined or session_edit.forcecancel is defined or is_granted('ROLE_ADMIN') %}
{% if is_granted('ROLE_ADMIN') %} {{ form_row(session_edit.user) }} @@ -32,11 +32,16 @@ {{ form_row(session_edit.raincancel) }} {% endif %} - {% if is_granted('ROLE_ADMIN') %} + {% if session_edit.forcecancel is defined %} + {{ form_row(session_edit.forcecancel) }} + {% endif %} - {{ form_row(session_edit.attribute) }} + {% if is_granted('ROLE_ADMIN') %} + {% if session_edit.attribute is defined %} + {{ form_row(session_edit.attribute) }} - {{ form_row(session_edit.autoattribute) }} + {{ form_row(session_edit.autoattribute) }} + {% endif %} {{ form_row(session_edit.lock) }} {% endif %} -- 2.41.1