From f068ac288fe2307b004060637f3a0d231dab334f Mon Sep 17 00:00:00 2001 From: Marc Ducobu Date: Thu, 22 Oct 2015 15:09:43 +0200 Subject: [PATCH] Debug JS - close refs #626 --- Resources/views/Form/fields.html.twig | 78 ++++++++++----------------- 1 file changed, 27 insertions(+), 51 deletions(-) diff --git a/Resources/views/Form/fields.html.twig b/Resources/views/Form/fields.html.twig index a097bc78f..76ec0cb5c 100644 --- a/Resources/views/Form/fields.html.twig +++ b/Resources/views/Form/fields.html.twig @@ -35,61 +35,37 @@ {# render the possibility to add different elements in a choice list #} {% block cf_choices_widget %} -{{ form(form) }} + {{ form(form) }} + + {# we use javascrit to add an additional element. All functions are personnalized with the id ( = form.vars.id) #} + + jQuery(document).ready(initializeCFChoiceOptionsChoices('{{ form.vars.id }}')); + {% endblock cf_choices_widget %}