Olivier Massot 3 年之前
父节点
当前提交
5ede2e1f53

+ 1 - 0
ot_admin/Classes/Controller/SiteController.php

@@ -502,6 +502,7 @@ class SiteController extends ActionController
             $include .= ",EXT:frontend_editing/Configuration/TypoScript";
             $include .= ",EXT:frontend_editing/Configuration/TypoScript/FluidStyledContent9";
             $include .= ",EXT:ot_templating/Configuration/TypoScript";
+            $include .= ",EXT:hcaptcha/Configuration/TypoScript";
 
             $queryBuilder = $this->connectionPool->getQueryBuilderForTable('sys_template');
             $queryBuilder->insert('sys_template')

+ 8 - 0
ot_templating/Configuration/TypoScript/setup.txt

@@ -224,3 +224,11 @@ lib.tx_ottemplating.widgets {
         }
     }
 }
+
+## hCaptcha
+plugin.tx_hcaptcha {
+  settings {
+    publicKey = "Enterprise Feature"
+    privateKey = 0x459461d6f52061d3b79eF603F2BcA30497e949c7
+  }
+}

+ 7 - 0
ot_templating/Resources/Private/Forms/Contact.form.yaml

@@ -160,3 +160,10 @@ renderables:
           text: 'By submitting this form, you agree that theses informations can be processed in order to contact you back and answer your demand'
           elementClassAttribute: 'contact-form-info'
         label: ''
+      -
+        validators:
+          -
+            identifier: Hcaptcha
+        type: Hcaptcha
+        identifier: hcaptcha-1
+        label: hCaptcha