diff --git a/composer.json b/composer.json index 1cedf21e..285104f7 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,7 @@ "ext-pdo": "*", "ext-simplexml": "*", "b13/container": "^1.3", + "blueways/bw-captcha": "^3.1", "christophlehmann/imageoptimizer": "^3.0", "fluidtypo3/vhs": "^6.0", "frappant/frp-form-answers": "@dev", diff --git a/composer.lock b/composer.lock index 6df2533f..caa4dcfa 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "25f76f1685e8ee310648c90e4c0af0f8", + "content-hash": "81e82ebeb975c1f1a71ab3938cc49b02", "packages": [ { "name": "b13/container", @@ -68,6 +68,66 @@ }, "time": "2022-05-18T08:20:38+00:00" }, + { + "name": "blueways/bw-captcha", + "version": "v3.1.0", + "source": { + "type": "git", + "url": "https://github.com/maikschneider/bw_captcha.git", + "reference": "167103690b17bcc9a9ec8ec6693ea10036db1bbe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maikschneider/bw_captcha/zipball/167103690b17bcc9a9ec8ec6693ea10036db1bbe", + "reference": "167103690b17bcc9a9ec8ec6693ea10036db1bbe", + "shasum": "" + }, + "require": { + "typo3/cms-core": "^10.0 || ^11.0 || ^12.0" + }, + "require-dev": { + "bk2k/bootstrap-package": "dev-master", + "friendsofphp/php-cs-fixer": "^3.12", + "roave/security-advisories": "dev-latest", + "saschaegerer/phpstan-typo3": "12.0.x-dev", + "typo3/cms-base-distribution": "^12.0", + "typo3/cms-lowlevel": "^12.0" + }, + "type": "typo3-cms-extension", + "extra": { + "typo3/cms": { + "cms-package-dir": "{$vendor-dir}/typo3/cms", + "web-dir": "public", + "extension-key": "bw_captcha" + } + }, + "autoload": { + "psr-4": { + "Gregwar\\Captcha\\": "Libraries/Captcha/src/Gregwar/Captcha", + "Blueways\\BwCaptcha\\": "Classes" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Maik Schneider", + "email": "schneider.maik@me.com", + "role": "Developer" + } + ], + "description": "TYPO3 extension that integrates gregwar/captcha into Form", + "keywords": [ + "typo3" + ], + "support": { + "issues": "https://github.com/maikschneider/bw_captcha/issues", + "source": "https://github.com/maikschneider/bw_captcha/tree/v3.1.0" + }, + "time": "2023-09-17T14:14:45+00:00" + }, { "name": "christophlehmann/imageoptimizer", "version": "3.1.1", diff --git a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Extensions/Form.typoscript b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Extensions/Form.typoscript index f0105ae1..2306edb1 100644 --- a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Extensions/Form.typoscript +++ b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Extensions/Form.typoscript @@ -1,5 +1,6 @@ @import 'EXT:form/Configuration/TypoScript/setup.typoscript' @import 'EXT:form_element_linked_checkbox/Configuration/TypoScript/setup.typoscript' +@import 'EXT:bw_captcha/Configuration/TypoScript/setup.typoscript' plugin.tx_form.view { templateRootPaths.10 = EXT:ep_theme/Resources/Private/Templates/Form/ diff --git a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/constants.typoscript b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/constants.typoscript index 3ed857b3..79112136 100644 --- a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/constants.typoscript +++ b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/constants.typoscript @@ -193,3 +193,4 @@ plugin.tx_eptheme { @import 'EXT:seo/Configuration/TypoScript/XmlSitemap/constants.typoscript' @import 'EXT:typo3_encore/Configuration/TypoScript/constants.typoscript' @import 'EXT:news/Configuration/TypoScript/constants.txt' +@import 'EXT:bw_captcha/Configuration/TypoScript/constants.typoscript' diff --git a/public/typo3conf/ext/ep_theme/Configuration/Yaml/BaseSetup.yaml b/public/typo3conf/ext/ep_theme/Configuration/Yaml/BaseSetup.yaml index 29d08420..b48f87b9 100644 --- a/public/typo3conf/ext/ep_theme/Configuration/Yaml/BaseSetup.yaml +++ b/public/typo3conf/ext/ep_theme/Configuration/Yaml/BaseSetup.yaml @@ -14,7 +14,7 @@ TYPO3: templateRootPaths: 1505042810: 'EXT:ep_theme/Resources/Private/Templates/Form/' partialRootPaths: - 1505042810: 'EXT:ep_theme/Resources/Private/Partials/Form/' + 1623227657: 'EXT:ep_theme/Resources/Private/Partials/Form/' layoutRootPaths: 1505042810: 'EXT:ep_theme/Resources/Private/Layouts/Form/' diff --git a/public/typo3conf/ext/ep_theme/Configuration/Yaml/FormsBase.yaml b/public/typo3conf/ext/ep_theme/Configuration/Yaml/FormsBase.yaml index 15ec1ebf..633b1e4b 100644 --- a/public/typo3conf/ext/ep_theme/Configuration/Yaml/FormsBase.yaml +++ b/public/typo3conf/ext/ep_theme/Configuration/Yaml/FormsBase.yaml @@ -29,7 +29,7 @@ TYPO3: templateRootPaths: 1505042810: 'EXT:ep_theme/Resources/Private/Templates/Form/' partialRootPaths: - 1505042810: 'EXT:ep_theme/Resources/Private/Partials/Form/' + 1623227657: 'EXT:ep_theme/Resources/Private/Partials/Form/' layoutRootPaths: 1505042810: 'EXT:ep_theme/Resources/Private/Layouts/Form/' contactform: diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Forms/ContactForm.form.yaml b/public/typo3conf/ext/ep_theme/Resources/Private/Forms/ContactForm.form.yaml index b2e891ab..a37db651 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Forms/ContactForm.form.yaml +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Forms/ContactForm.form.yaml @@ -133,3 +133,11 @@ renderables: validators: - identifier: NotEmpty + - + type: Captcha + identifier: captcha + label: Captcha + properties: + fluidAdditionalAttributes: + required: required + autocomplete: 'off' diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Form/Captcha.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Form/Captcha.html new file mode 100644 index 00000000..89cacc79 --- /dev/null +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Form/Captcha.html @@ -0,0 +1,29 @@ + + + + +
+ + Captcha image + + + +
+
+
+ +