From 7eca42e7366dffb337dc88acdd857173b7a3cc75 Mon Sep 17 00:00:00 2001 From: Matteo Peronnet Date: Wed, 25 Apr 2018 14:23:08 +0000 Subject: [PATCH 1/3] Prevent render of multiple google api script tag --- Resources/config/assetic_injector.json | 5 ++--- Resources/views/macros/form_elements.html.twig | 14 +------------- Resources/views/show.html.twig | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Resources/config/assetic_injector.json b/Resources/config/assetic_injector.json index be21d19..9ca4b33 100644 --- a/Resources/config/assetic_injector.json +++ b/Resources/config/assetic_injector.json @@ -4,13 +4,12 @@ "javascripts": { "foot": [ - "@VictoireWidgetFormBundle/Resources/public/js/validator.js", - "https://www.google.com/recaptcha/api.js" + "@VictoireWidgetFormBundle/Resources/public/js/validator.js" ] }, "stylesheets": { - "head": "@VictoireWidgetFormBundle/Resources/public/css/recaptcha.css" + "victoire_widget_form_recaptcha": "@VictoireWidgetFormBundle/Resources/public/css/recaptcha.css" } } } \ No newline at end of file diff --git a/Resources/views/macros/form_elements.html.twig b/Resources/views/macros/form_elements.html.twig index 1950847..3db3bfe 100644 --- a/Resources/views/macros/form_elements.html.twig +++ b/Resources/views/macros/form_elements.html.twig @@ -1,15 +1,3 @@ {% macro recaptcha(siteKey)%} - - {% stylesheets injector="head" - '@VictoireWidgetFormBundle/Resources/public/css/recaptcha.css' - %} - {% endstylesheets %} -
- - {% javascripts injector="foot" - 'http://www.google.com/recaptcha/api.js' - %} - {% endjavascripts %} - -{% endmacro %} \ No newline at end of file +{% endmacro %} diff --git a/Resources/views/show.html.twig b/Resources/views/show.html.twig index 37e0095..7a9b782 100644 --- a/Resources/views/show.html.twig +++ b/Resources/views/show.html.twig @@ -135,9 +135,24 @@ {% if recaptcha_public_key is defined %} + {% stylesheets injector="victoire_widget_form_recaptcha" + %} + + {% endstylesheets %}
{{formElements.recaptcha(recaptcha_public_key)}} +
{% endif %} From a03f59f6ffea8fd4ded4c94f02c09fc9e2654802 Mon Sep 17 00:00:00 2001 From: Leny BERNARD Date: Sat, 28 Apr 2018 00:25:08 +0200 Subject: [PATCH 2/3] set valid circleci php version --- circle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index 662e1d3..a2cc087 100644 --- a/circle.yml +++ b/circle.yml @@ -7,7 +7,7 @@ machine: services: - redis php: - version: 7.1.0 + version: 7.1.9 checkout: post: @@ -28,4 +28,4 @@ test: general: artifacts: - - "fails" \ No newline at end of file + - "fails" From c70899cf1ca3b4589d32d0516c64594f5f7a0e2a Mon Sep 17 00:00:00 2001 From: Paul Andrieux Date: Mon, 30 Apr 2018 10:43:19 +0200 Subject: [PATCH 3/3] update test suite --- victoire-test-suite | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/victoire-test-suite b/victoire-test-suite index a8ddf89..72c02a6 160000 --- a/victoire-test-suite +++ b/victoire-test-suite @@ -1 +1 @@ -Subproject commit a8ddf89e127d362dff2e4c7dc8f0b8ffab81bb06 +Subproject commit 72c02a6ea7ae6adf00981240c20c12fbe67b2278