diff --git a/e107_admin/prefs.php b/e107_admin/prefs.php index 2e2f470d7..b040646dd 100644 --- a/e107_admin/prefs.php +++ b/e107_admin/prefs.php @@ -516,7 +516,8 @@ $text .= "
".PRFLAN_274."
- + + ".$frm->textarea('contact_filter', $pref['contact_filter'], 5, 59, array('size'=>'xxlarge'))." @@ -526,7 +527,6 @@ $text .= "
- "; @@ -550,6 +550,39 @@ $text .= "
"; +// GDPR Settings ----------------------------- +$text .= " +
+ ".PRFLAN_277." + + + + + + + + + + + + + + + + +
+ ".$frm->text('gdpr_privacypolicy', $pref['gdpr_privacypolicy'], 200, array('size'=>'xxlarge'))." +
".PRFLAN_279."
+
+ ".$frm->text('gdpr_termsandconditions', $pref['gdpr_termsandconditions'], 200, array('size'=>'xxlarge'))." +
".PRFLAN_281."
+
+ ".pref_submit('display')." +
+"; + + + $text .= "
".PRFLAN_13." @@ -2043,6 +2076,7 @@ function prefs_adminmenu() $var['core-prefs-header1']['header'] = LAN_BASIC_OPTIONS; $var['core-prefs-main']['text'] = PRFLAN_1; $var['core-prefs-email']['text'] = PRFLAN_254; + $var['core-prefs-gdpr']['text'] = PRFLAN_277; $var['core-prefs-registration']['text'] = PRFLAN_28; $var['core-prefs-signup']['text'] = PRFLAN_19; // $var['core-prefs-sociallogin']['text'] = "Social Options"; // Moved into plugin. diff --git a/e107_admin/update_routines.php b/e107_admin/update_routines.php index a46b58354..92a9fd074 100644 --- a/e107_admin/update_routines.php +++ b/e107_admin/update_routines.php @@ -599,15 +599,15 @@ function update_core_database($type = '') $e_user_list = e107::getPref('e_user_list'); - if(empty($e_user_list['user'])) // check e107_plugins/user/e_user.php is registered. - { - if($just_check) - { - return update_needed("user/e_user.php need to be registered"); // NO LAN. - } - e107::getPlug()->clearCache()->buildAddonPrefLists(); - } + if(empty($e_user_list['user'])) // check e107_plugins/user/e_user.php is registered. + { + if($just_check) + { + return update_needed("user/e_user.php need to be registered"); // NO LAN. + } + + } // Make sure, that the pref "post_script" contains one of the allowed userclasses diff --git a/e107_core/shortcodes/batch/contact_shortcodes.php b/e107_core/shortcodes/batch/contact_shortcodes.php index a027fd912..f69274360 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('gdpr_privacypolicy', ''); + if (!$pp) + { + return ''; + } + $class = (!empty($parm['class'])) ? $parm['class'] : ''; + $link = sprintf('%s', $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_core/xml/default_install.xml b/e107_core/xml/default_install.xml index 72b91c60e..bdfd35b67 100644 --- a/e107_core/xml/default_install.xml +++ b/e107_core/xml/default_install.xml @@ -149,6 +149,8 @@ '', )]]> + + 0 80 /usr/X11R6/bin/ diff --git a/e107_languages/English/admin/lan_prefs.php b/e107_languages/English/admin/lan_prefs.php index 9559c7679..d6615e9fa 100644 --- a/e107_languages/English/admin/lan_prefs.php +++ b/e107_languages/English/admin/lan_prefs.php @@ -295,3 +295,9 @@ define("PRFLAN_273", "Lifetime in seconds. 0 = until the browser is closed. "); define("PRFLAN_274", "Contact form will only be visible to this userclass group."); define("PRFLAN_275", "View this page using https (SSL) to modify this option"); define("PRFLAN_276", "PHP Default (Preferred)"); + +define("PRFLAN_277", "GDPR Settings"); +define("PRFLAN_278", "URL to the Privacy Policy"); +define("PRFLAN_279", "Make sure the url exists! It's best to use an absolute url. This setting will be used on all places that require a consent from the user (e.g. signup, contact form/menu, etc.)."); +define("PRFLAN_280", "URL to the website terms and conditions"); +define("PRFLAN_281", "Make sure the url exists! It's best to use an absolute url. This setting will be used on all places that require a consent from the user (e.g. signup, contact form/menu, etc.)."); 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");