From 981340db3d0e1646575b50d24fc3cbcb5a118078 Mon Sep 17 00:00:00 2001 From: deltacms Date: Mon, 1 Apr 2024 14:05:50 +0200 Subject: [PATCH] form + common.css + module config --- CHANGES.md | 8 +++++--- core/layout/common.css | 5 +++++ core/module/config/config.php | 1 + core/module/config/lang/en/lex_config.php | 3 +++ core/module/config/lang/es/lex_config.php | 3 +++ core/module/config/lang/fr/lex_config.php | 3 +++ core/module/config/view/locale/locale.php | 22 ++++++++++++++++++++++ module/form/form.php | 11 ++++++++--- 8 files changed, 50 insertions(+), 6 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b91fe92..668b0be 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,12 +2,14 @@ ## Version 5.0.03 de Deltacms - Modifications : - - module Blog : nouvelle structure pour l'enregistrement des données de pages utilisant ce module, pour alléger le fichier module.json commun à l'ensembles des modules, - - + - module Blog 7.0 : nouvelle structure pour l'enregistrement des données de pages utilisant ce module, pour alléger le fichier module.json commun à l'ensemble des modules, + - module Form 6.0 : idem, + - module News 5.0 : idem, - Correction : - Filemanager : correction d'instructions dépréciées. - Sur le site : - - + - module sondage 2.0 : nouvelle structure pour l'enregistrement des données de pages utilisant ce module et nouvelle option avec validation de la participation par un lien + - module guestbook 2.0 : ## Version 5.0.02 de Deltacms - Modifications : diff --git a/core/layout/common.css b/core/layout/common.css index ed5f6bd..74a7299 100644 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -620,6 +620,11 @@ footer #footerSocials .delta-ico-github:hover { max-width: 80px; margin: 0 10px; } + +input[type="checkbox"][name="formRgpdCheck"]{ + padding: 0 9px; +} + /* Inputs génériques */ input[type="email"], input[type="text"], diff --git a/core/module/config/config.php b/core/module/config/config.php index 3fc0bfd..bff9cab 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -454,6 +454,7 @@ class config extends common { 'title' => $this->getInput('localeTitle', helper::FILTER_STRING_SHORT, true), 'captchaSimpleText' => $this->getInput('localeCaptchaSimpleText', helper::FILTER_STRING_LONG), 'captchaSimpleHelp' => $this->getInput('localeCaptchaSimpleHelp', helper::FILTER_STRING_LONG), + 'questionnaireAccept' => $this->getInput('localeQuestionnaireAccept', helper::FILTER_STRING_LONG), 'cookies' => [ // Les champs sont obligatoires si l'option consentement des cookies est active 'cookiesDeltaText' => $this->getInput('localeCookiesDeltaText', helper::FILTER_STRING_LONG, $this->getData(['config', 'cookieConsent'])), diff --git a/core/module/config/lang/en/lex_config.php b/core/module/config/lang/en/lex_config.php index ee5a35b..109bc52 100644 --- a/core/module/config/lang/en/lex_config.php +++ b/core/module/config/lang/en/lex_config.php @@ -105,6 +105,9 @@ $text['core_config_view']['locale'][56] = 'Name or nickname'; $text['core_config_view']['locale'][57] = 'Comment'; $text['core_config_view']['locale'][58] = 'Link between name and date'; $text['core_config_view']['locale'][59] = 'Page'; +$text['core_config_view']['locale'][60] = 'Acceptance of the conditions of use of personal data '; +$text['core_config_view']['locale'][61] = 'Text associated with the checkbox'; +$text['core_config_view']['locale'][62] = ' I accept the conditions of use of my personal data'; $text['core_config_view']['network'][0] = 'Settings'; $text['core_config_view']['network'][1] = 'Proxy type'; diff --git a/core/module/config/lang/es/lex_config.php b/core/module/config/lang/es/lex_config.php index fbe35ac..868dffb 100644 --- a/core/module/config/lang/es/lex_config.php +++ b/core/module/config/lang/es/lex_config.php @@ -105,6 +105,9 @@ $text['core_config_view']['locale'][56] = 'Nombre o apodo'; $text['core_config_view']['locale'][57] = 'Comentario'; $text['core_config_view']['locale'][58] = 'Vínculo entre nombre y fecha'; $text['core_config_view']['locale'][59] = 'Página'; +$text['core_config_view']['locale'][60] = 'Aceptación de las condiciones de uso de datos personales '; +$text['core_config_view']['locale'][61] = 'Texto asociado con la casilla de verificación'; +$text['core_config_view']['locale'][62] = ' Acepto las condiciones de uso de mis datos personales'; $text['core_config_view']['network'][0] = 'Configuración'; $text['core_config_view']['network'][1] = 'Tipo de proxy'; diff --git a/core/module/config/lang/fr/lex_config.php b/core/module/config/lang/fr/lex_config.php index f1ff4c3..4c9576b 100644 --- a/core/module/config/lang/fr/lex_config.php +++ b/core/module/config/lang/fr/lex_config.php @@ -105,6 +105,9 @@ $text['core_config_view']['locale'][56] = 'Nom ou pseudo'; $text['core_config_view']['locale'][57] = 'Commentaire'; $text['core_config_view']['locale'][58] = 'Liaison entre nom et date'; $text['core_config_view']['locale'][59] = 'Page'; +$text['core_config_view']['locale'][60] = 'Acceptation des conditions d\'utilisation des données personnelles '; +$text['core_config_view']['locale'][61] = 'Texte associé à la case à cocher'; +$text['core_config_view']['locale'][62] = ' J\'accepte les conditions d\'utilisation de mes données personnelles'; $text['core_config_view']['network'][0] = 'Paramètres'; $text['core_config_view']['network'][1] = 'Type de proxy'; diff --git a/core/module/config/view/locale/locale.php b/core/module/config/view/locale/locale.php index 77491b2..6de116d 100644 --- a/core/module/config/view/locale/locale.php +++ b/core/module/config/view/locale/locale.php @@ -302,6 +302,28 @@ else{ +
+
+
+
+ + + + + +
+
+
+ $text['core_config_view']['locale'][61], + 'placeholder' => $text['core_config_view']['locale'][62], + 'value' => $this->getData(['locale', 'questionnaireAccept']) + ]); ?> +
+
+
+
+
diff --git a/module/form/form.php b/module/form/form.php index a70ea89..7a3bac2 100644 --- a/module/form/form.php +++ b/module/form/form.php @@ -85,7 +85,7 @@ class form extends common { $this->setData(['module', $this->getUrl(0), 'config', 'versionData','4.1']); } if( version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '6.0', '<') ){ - // Déplaement des données de page de module.json 'data' vers data_module/nom_page.json 'data' + // Déplacement des données de page de module.json 'data' vers data_module/nom_page.json 'data' $this->setData(['data_module', $this->getUrl(0), 'data', $this->getData(['module', $this->getUrl(0), 'data']) ]); $this->deleteData(['module', $this->getUrl(0), 'data']); $this->setData(['module', $this->getUrl(0), 'config', 'versionData', '6.0']); @@ -261,12 +261,17 @@ class form extends common { } else { $data = $this->getData(['data_module', $this->getUrl(0), 'data']); if ($data !== []) { - $csvfilename = 'data-'.date('dmY').'-'.date('hm').'-'.rand(10,99).'.csv'; + $csvfilename = 'data-'.date('dmY').'-'.date('Hi').'-'.rand(10,99).'.csv'; if (!file_exists(self::FILE_DIR.'source/data')) { mkdir(self::FILE_DIR.'source/data', 0755); } $fp = fopen(self::FILE_DIR.'source/data/'.$csvfilename, 'w'); - fputcsv($fp, array_keys($data[1]), ';','"'); + // Récupérer les bonnes clefs + foreach($data as $key=>$value){ + $tabdata = array_keys($data[$key]); + break; + } + fputcsv($fp, $tabdata, ';','"'); foreach ($data as $fields) { fputcsv($fp, $fields, ';','"'); }