]> _ Git - cubeextranet.git/commitdiff
wip #5036 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 17 Jan 2022 18:31:27 +0000 (18:31 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 17 Jan 2022 18:31:27 +0000 (18:31 +0000)
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index db21761781a1fa002d0158ed539a40515d81e987..1d3660f96a23c4ee81ff38da72f66eb7ceecf212 100644 (file)
@@ -771,8 +771,9 @@ class wsBookParametres extends wsParametres
         $this->fields['restrictDownload'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __("Restreindre le téléchargement du pdf"), 'grade' => 5);
         $this->fields['restrictSendBookmark'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __("Restreindre l'envoi de marques-pages"), 'grade' => 5);
         $this->fields['restrictPrintDownload'] = ['type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Paramètre de l\'url permettant de désactiver la restriction (non vide pour activer les restrictions)'), 'grade' => 5, 'hint' => __("Ne pas indiquer le ?")];
+        $this->fields['recaptcha'] = ['type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Activer reCATPCHA v3 (clé du site)')];
         $this->forms['secure'] = array('label' => __('Sécurisation'),
-            'fieldsnames' => array('secureURL', 'secureURLRedirect', '|', 'secureClientSidePassword', 'secureClientSidePasswordCredentials', '|', 'preventRightClick', '|', 'restrictPrintDownload', 'restrictPrint', 'restrictDownload', 'restrictSendBookmark'));
+            'fieldsnames' => array('secureURL', 'secureURLRedirect', '|', 'secureClientSidePassword', 'secureClientSidePasswordCredentials', '|', 'preventRightClick', '|', 'restrictPrintDownload', 'restrictPrint', 'restrictDownload', 'restrictSendBookmark', '|', 'recaptcha'));
 
         $this->fields['home'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Accueil de l'interface multibrochure"), 'grade' => 5);
         $this->fields['multilang'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Langues'), 'hint' => __('Code langue') . ',' . __('Code pays') . ',' . __('URL'));
index 6ac5cf8ccdff115c26fbc8169a8abb786d534bcd..d633ca3ddd0c8dde74dcc01597851c8824596fac 100644 (file)
@@ -1114,6 +1114,10 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
 
             $this->config->secureClientSidePasswordCredentials = $users;
         }
+
+        if ($this->book->parametres->recaptcha) {
+            $this->beginBody[] = '<script src="https://www.google.com/recaptcha/api.js?render=' . $this->book->parametres->recaptcha . '"></script>';
+        }
     }
 
     protected function loadPlugins()