From 3fa6935af8eea179bf1001f20df02ebdd4a339ad Mon Sep 17 00:00:00 2001 From: "Philipp A. Mohrenweiser" Date: Tue, 9 May 2017 19:21:26 +0200 Subject: [PATCH] Implement disabled feature from symfony2 forms Dont show the edit button if symfony2 form says field is disabled. maybe we should exclude also js etc? --- Resources/views/Form/fields.html.twig | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Resources/views/Form/fields.html.twig b/Resources/views/Form/fields.html.twig index aec5ade2..3e4f8b7c 100644 --- a/Resources/views/Form/fields.html.twig +++ b/Resources/views/Form/fields.html.twig @@ -13,11 +13,13 @@
-
- - {% trans %}Edit{% endtrans %} - -
+ {% if not disabled %} +
+ + {% trans %}Edit{% endtrans %} + +
+ {% endif %}
{% if not options.fieldImage %} {% if form[name].vars.value %}