From 42ed074f6f2496d3791c2f31c8f2c739904121e0 Mon Sep 17 00:00:00 2001 From: Dennis Bijsterveld Date: Wed, 7 Dec 2016 11:10:29 +0100 Subject: [PATCH] Change document ready for compatibility mode with other libraries --- src/Resources/views/Form/dynamic_validate.js.twig | 4 ++-- src/Resources/views/Form/form_validate.js.twig | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Resources/views/Form/dynamic_validate.js.twig b/src/Resources/views/Form/dynamic_validate.js.twig index 4e697e1..010541e 100644 --- a/src/Resources/views/Form/dynamic_validate.js.twig +++ b/src/Resources/views/Form/dynamic_validate.js.twig @@ -1,7 +1,7 @@ {% import "BoekkooiJqueryValidationBundle:Form:macros.js.twig" as gen %} {%- autoescape false -%} -(function($) { +jQuery(function($) { "use strict"; var form = $("{{- gen.form_jquery_selector(form) -}}"); var validator = form.validate(); @@ -13,5 +13,5 @@ }); {%- endif -%} {%- endfor -%} -})(jQuery); +}); {%- endautoescape -%} diff --git a/src/Resources/views/Form/form_validate.js.twig b/src/Resources/views/Form/form_validate.js.twig index e2c6edc..bf72694 100644 --- a/src/Resources/views/Form/form_validate.js.twig +++ b/src/Resources/views/Form/form_validate.js.twig @@ -1,7 +1,7 @@ {% import "BoekkooiJqueryValidationBundle:Form:macros.js.twig" as gen %} {%- autoescape false -%} -(function($) { +jQuery(function($) { "use strict"; var form = $("{{- gen.form_jquery_selector(form) -}}"); var validator = form.validate({ @@ -26,5 +26,5 @@ }); {%- endif -%} {%- endfor %} -})(jQuery); +}); {%- endautoescape -%}