From 986633d117d898fbd5cc57767d4362702f7ff156 Mon Sep 17 00:00:00 2001 From: Achim Ennenbach Date: Mon, 27 Aug 2018 20:12:54 +0200 Subject: [PATCH] fixes #3375 added GDPR Agreement checkbox to contact form (incl. Lans) --- .../shortcodes/batch/contact_shortcodes.php | 21 +++++++++++++++++++ e107_core/templates/contact_template.php | 15 +++++++++++++ e107_languages/English/lan_contact.php | 4 ++++ 3 files changed, 40 insertions(+) diff --git a/e107_core/shortcodes/batch/contact_shortcodes.php b/e107_core/shortcodes/batch/contact_shortcodes.php index a027fd912..2be64fbbb 100644 --- a/e107_core/shortcodes/batch/contact_shortcodes.php +++ b/e107_core/shortcodes/batch/contact_shortcodes.php @@ -168,6 +168,27 @@ class contact_shortcodes extends e_shortcode return ""; } + function sc_contact_gdpr_check($parm='') + { + $parm['class'] = (!empty($parm['class'])) ? $parm['class'] : ''; + $parm = array_merge(array('required'=>1), $parm); + return e107::getForm()->checkbox('gdpr', 1,false, $parm); + } + + function sc_contact_gdpr_link($parm='') + { + $pp = e107::getPref('contact_privacypolicy', ''); + if (!$pp) + { + return ''; + } + $class = (!empty($parm['class'])) ? $parm['class'] : ''; + $link = e107::getParser()->lanVars('[z]', array($class, $pp, LANCONTACT_22)); + $text = e107::getParser()->lanVars(LANCONTACT_23, $link); + return $text; + } + + } ?> diff --git a/e107_core/templates/contact_template.php b/e107_core/templates/contact_template.php index 2c115e93a..5f983aeea 100644 --- a/e107_core/templates/contact_template.php +++ b/e107_core/templates/contact_template.php @@ -51,6 +51,12 @@ $CONTACT_TEMPLATE['menu'] = ' {CONTACT_BODY=rows=5&cols=30} +
+
+ +
{CONTACT_GDPR_LINK}
+
+
{CONTACT_SUBMIT_BUTTON} '; @@ -97,6 +103,15 @@ $CONTACT_TEMPLATE['menu'] = ' {CONTACT_IMAGECODE} {CONTACT_IMAGECODE_INPUT} +
+
+ +
{CONTACT_GDPR_LINK}
+
+
+ + +
{CONTACT_SUBMIT_BUTTON}
diff --git a/e107_languages/English/lan_contact.php b/e107_languages/English/lan_contact.php index fb0c02047..6ac74db5c 100644 --- a/e107_languages/English/lan_contact.php +++ b/e107_languages/English/lan_contact.php @@ -37,5 +37,9 @@ define("LANCONTACT_17", "Please enter your name."); define("LANCONTACT_18", "Please enter your e-mail address."); define("LANCONTACT_19", "Please enter the subject for your e-mail."); define("LANCONTACT_20", "Please enter your message for us."); +define("LANCONTACT_21", "I consent to having this website store my submitted information so they can respond to my inquiry"); // By using this form, you agree to the storage and processing of your data through this site."); +define("LANCONTACT_22", "Privacy policy"); +define("LANCONTACT_23", "You can find our privacy policy here: [x]"); +define("LANCONTACT_24", "GDPR Agreement");