From 90908a049449b94bcab950524875e74838ba2113 Mon Sep 17 00:00:00 2001
From: Heiko Kromm <h.kromm@paints.de>
Date: Thu, 2 Jul 2020 16:12:13 +0200
Subject: [PATCH 1/2] TASK: Set requirements to work with neos 5

---
 Resources/Private/Form/Captcha.html | 4 ++--
 composer.json                       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Resources/Private/Form/Captcha.html b/Resources/Private/Form/Captcha.html
index f49e990..89c5460 100644
--- a/Resources/Private/Form/Captcha.html
+++ b/Resources/Private/Form/Captcha.html
@@ -15,5 +15,5 @@
     <script src="{f:uri.resource(path: 'js/closest.min.js', package: 'Wegmeister.Recaptcha')}"></script>
   </f:if>
   <script
-    type="text/javascript">!function (d, w, m) { <f: if condition="{element.renderingOptions.includeAPIScript}">w.hasReCaptchaAPI||(w.hasReCaptchaAPI=true,m=d.createElement('script'),m.async=1,m.defer=1,m.src='https://www.google.com/recaptcha/api.js{f: if(condition: element.properties.lang, then: "?hl={element.properties.lang}")}',d.body.appendChild(m));</f: if> w.gRecaptchaCount= w.gRecaptchaCount || 0; var g = d.querySelectorAll(".g-recaptcha")[w.gRecaptchaCount], a = g.closest("form"); a.addEventListener("submit", function (t) { g.previousElementSibling.value = g.querySelector(".g-recaptcha-response").value }, !1); w.gRecaptchaCount++ }(document, window)</script>
-</f:section>
\ No newline at end of file
+    type="text/javascript">!function (d, w, m) { <f:if condition="{element.renderingOptions.includeAPIScript}">w.hasReCaptchaAPI||(w.hasReCaptchaAPI=true,m=d.createElement('script'),m.async=1,m.defer=1,m.src='https://www.google.com/recaptcha/api.js{f:if(condition: element.properties.lang, then: "?hl={element.properties.lang}")}',d.body.appendChild(m));</f:if> w.gRecaptchaCount= w.gRecaptchaCount || 0; var g = d.querySelectorAll(".g-recaptcha")[w.gRecaptchaCount], a = g.closest("form"); a.addEventListener("submit", function (t) { g.previousElementSibling.value = g.querySelector(".g-recaptcha-response").value }, !1); w.gRecaptchaCount++ }(document, window)</script>
+</f:section>
diff --git a/composer.json b/composer.json
index 8e8d424..e5b9a89 100644
--- a/composer.json
+++ b/composer.json
@@ -5,7 +5,7 @@
     "description": "Form Element for the Flow Form Framework integrating Google's Recaptcha",
     "require": {
         "google/recaptcha": "^1.2",
-        "neos/form": "^4.0",
+        "neos/form": "^5.0",
         "php": "~7.0"
     },
     "autoload": {

From 781166b5733ab5474f5d07f33abbff32cc676576 Mon Sep 17 00:00:00 2001
From: Heiko Kromm <h.kromm@paints.de>
Date: Mon, 6 Jul 2020 09:23:38 +0200
Subject: [PATCH 2/2] TASK: Make requirements downwards compatible with neos 4

---
 composer.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/composer.json b/composer.json
index e5b9a89..55036b7 100644
--- a/composer.json
+++ b/composer.json
@@ -5,7 +5,7 @@
     "description": "Form Element for the Flow Form Framework integrating Google's Recaptcha",
     "require": {
         "google/recaptcha": "^1.2",
-        "neos/form": "^5.0",
+        "neos/form": "^4.0 || ^5.0",
         "php": "~7.0"
     },
     "autoload": {