From 43137f37c3febdba37e0c3c82283e9faa582c971 Mon Sep 17 00:00:00 2001 From: deltacms Date: Sat, 20 Apr 2024 09:12:27 +0200 Subject: [PATCH] form avec option validation rgpd --- module/form/form.php | 6 +++++- module/form/lang/en/lex_form.php | 2 ++ module/form/lang/es/lex_form.php | 2 ++ module/form/lang/fr/lex_form.php | 2 ++ module/form/view/config/config.php | 8 +++++++- module/form/view/index/index.php | 9 +++++++++ 6 files changed, 27 insertions(+), 2 deletions(-) diff --git a/module/form/form.php b/module/form/form.php index 7a3bac2..c657364 100644 --- a/module/form/form.php +++ b/module/form/form.php @@ -141,7 +141,8 @@ class form extends common { 'uploadPng' => $this->getInput('formConfigUploadPng', helper::FILTER_BOOLEAN), 'uploadPdf' => $this->getInput('formConfigUploadPdf', helper::FILTER_BOOLEAN), 'uploadZip' => $this->getInput('formConfigUploadZip', helper::FILTER_BOOLEAN), - 'uploadTxt' => $this->getInput('formConfigUploadTxt', helper::FILTER_BOOLEAN) + 'uploadTxt' => $this->getInput('formConfigUploadTxt', helper::FILTER_BOOLEAN), + 'rgpdCheck' => $this->getInput('formConfigRgpdCheck', helper::FILTER_BOOLEAN) ] ]); // Génération des données vides @@ -475,6 +476,9 @@ class form extends common { } } + // Ajout d'une notice sur la case à cocher d'acceptation des conditions si elle est utilisée et non cochée + if( $this->getData(['module', $this->getUrl(0), 'config', 'rgpdCheck'])) $rgpdCheckbox = $this->getInput('formRgpdCheck', helper::FILTER_BOOLEAN,true); + // Préparation du contenu du mail $data = []; $replyTo = null; diff --git a/module/form/lang/en/lex_form.php b/module/form/lang/en/lex_form.php index c9dfd19..d1d8350 100644 --- a/module/form/lang/en/lex_form.php +++ b/module/form/lang/en/lex_form.php @@ -41,6 +41,8 @@ $text['form_view']['config'][37] = 'txt'; $text['form_view']['config'][38] = 'Note in the label of the file field the type and size of files allowed. Checks are performed on jpg, png, pdf and zip files but not on txt files. Be careful!'; $text['form_view']['config'][39] = 'Help'; $text['form_view']['config'][40] = 'module/form/view/config/config.help_en.html'; +$text['form_view']['config'][41] = 'Check box for acceptance of the conditions of use of personal data'; +$text['form_view']['config'][42] = 'If your questionnaire concerns personal data, the GDPR in certain countries requires acceptance of their conditions of use by the participant. You must also explain why you are using this data. The associated text must be updated in location configuration.'; $text['form_view']['data'][0] = 'Back'; $text['form_view']['data'][1] = 'Delete all'; $text['form_view']['data'][2] = 'CSV export'; diff --git a/module/form/lang/es/lex_form.php b/module/form/lang/es/lex_form.php index 4f04cfb..21b2ebf 100644 --- a/module/form/lang/es/lex_form.php +++ b/module/form/lang/es/lex_form.php @@ -41,6 +41,8 @@ $text['form_view']['config'][37] = 'txt'; $text['form_view']['config'][38] = 'Anote en el campo de archivo la etiqueta del tipo y tamaño de los archivos autorizados. Las comprobaciones se realizan en archivos jpg, png, pdf y zip, pero no en archivos txt. Precaución !'; $text['form_view']['config'][39] = 'Ayuda'; $text['form_view']['config'][40] = 'module/form/view/config/config.help_en.html'; +$text['form_view']['config'][41] = 'Marque la casilla de aceptación de las condiciones de uso de datos personales'; +$text['form_view']['config'][42] = 'Si su cuestionario se refiere a datos personales, el RGPD en ciertos países requiere la aceptación de sus condiciones de uso por parte del participante. También debe explicar por qué está utilizando estos datos. El texto asociado debe actualizarse en la configuración de ubicación.'; $text['form_view']['data'][0] = 'Atrás'; $text['form_view']['data'][1] = 'Borrar todo'; $text['form_view']['data'][2] = 'Exportar CSV'; diff --git a/module/form/lang/fr/lex_form.php b/module/form/lang/fr/lex_form.php index 42f8841..823fc81 100644 --- a/module/form/lang/fr/lex_form.php +++ b/module/form/lang/fr/lex_form.php @@ -41,6 +41,8 @@ $text['form_view']['config'][37] = 'txt'; $text['form_view']['config'][38] = 'Notez dans le label du champ fichier le type et la taille des fichiers autorisés. Des contrôles sont effectués sur les fichiers jpg, png, pdf et zip mais pas sur les fichiers txt. Prudence !'; $text['form_view']['config'][39] = 'Aide'; $text['form_view']['config'][40] = 'module/form/view/config/config.help.html'; +$text['form_view']['config'][41] = 'Case à cocher d\'acceptation des conditions d\utilisation des données personnelles (RGPD)'; +$text['form_view']['config'][42] = 'Si votre questionnaire concerne des données personnelles la RGPD de certains pays requiert l\'acceptation de leur condition d\'utilisation par le participant. Vous devez également expliquer pour quelle raison vous utilisez ces données. Le texte associé est à mettre à jour dans configuration localisation.'; $text['form_view']['data'][0] = 'Retour'; $text['form_view']['data'][1] = 'Tout effacer'; $text['form_view']['data'][2] = 'Export CSV'; diff --git a/module/form/view/config/config.php b/module/form/view/config/config.php index 1ebc9fc..08769e2 100644 --- a/module/form/view/config/config.php +++ b/module/form/view/config/config.php @@ -184,11 +184,17 @@ include('./module/form/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) .
getUser('group') < self::GROUP_MODERATOR) echo '
'; ?>> -
+
$this->getData(['module', $this->getUrl(0), 'config', 'captcha']) ]); ?>
+
+ $this->getData(['module', $this->getUrl(0), 'config', 'rgpdCheck']), + 'help' => $text['form_view']['config'][42] + ]); ?> +
getUser('group') < self::GROUP_MODERATOR) echo '
'; ?>>
diff --git a/module/form/view/index/index.php b/module/form/view/index/index.php index ecbf475..9209f69 100644 --- a/module/form/view/index/index.php +++ b/module/form/view/index/index.php @@ -41,6 +41,15 @@ echo ''; if($this->getData(['module', $this->getUrl(0), 'input'])): ?> + getData(['module', $this->getUrl(0), 'config', 'rgpdCheck' ]) === true){ ?> +
+
+ getData(['locale', 'questionnaireAccept']), [ + 'checked' => false + ]); ?> +
+
+
getData(['module', $this->getUrl(0), 'input']) as $index => $input): ?>