mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 12:20:44 +02:00
Merge pull request #3404 from SimSync/fix_3375
Fixes #3375 Added GDPR Agreement checkbox to contact form (incl. Lans)
This commit is contained in:
@@ -516,6 +516,7 @@ $text .= "<fieldset class='e-hideme' id='core-prefs-email'>
|
||||
<div class='smalltext field-help'>".PRFLAN_274."</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for='contact-filter'>".PRFLAN_270."</label></td>
|
||||
<td>
|
||||
@@ -526,7 +527,6 @@ $text .= "<fieldset class='e-hideme' id='core-prefs-email'>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td><label for='contact-emailcopy'>".PRFLAN_164."</label></td>
|
||||
<td>";
|
||||
@@ -550,6 +550,39 @@ $text .= "<fieldset class='e-hideme' id='core-prefs-email'>
|
||||
</fieldset>";
|
||||
|
||||
|
||||
// GDPR Settings -----------------------------
|
||||
$text .= "
|
||||
<fieldset class='e-hideme' id='core-prefs-gdpr'>
|
||||
<legend>".PRFLAN_277."</legend>
|
||||
<table class='table adminform'>
|
||||
<colgroup>
|
||||
<col class='col-label' />
|
||||
<col class='col-control' />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><label for='gdpr-privacypolicy'>".PRFLAN_278."</label></td>
|
||||
<td>
|
||||
".$frm->text('gdpr_privacypolicy', $pref['gdpr_privacypolicy'], 200, array('size'=>'xxlarge'))."
|
||||
<div class='smalltext field-help'>".PRFLAN_279."</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for='gdpr-termsandconditions'>".PRFLAN_280."</label></td>
|
||||
<td>
|
||||
".$frm->text('gdpr_termsandconditions', $pref['gdpr_termsandconditions'], 200, array('size'=>'xxlarge'))."
|
||||
<div class='smalltext field-help'>".PRFLAN_281."</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
".pref_submit('display')."
|
||||
</fieldset>
|
||||
";
|
||||
|
||||
|
||||
|
||||
$text .= "
|
||||
<fieldset class='e-hideme' id='core-prefs-display'>
|
||||
<legend>".PRFLAN_13."</legend>
|
||||
@@ -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.
|
||||
|
@@ -599,6 +599,7 @@ function update_core_database($type = '')
|
||||
|
||||
$e_user_list = e107::getPref('e_user_list');
|
||||
|
||||
e107::getPlug()->clearCache()->buildAddonPrefLists();
|
||||
if(empty($e_user_list['user'])) // check e107_plugins/user/e_user.php is registered.
|
||||
{
|
||||
if($just_check)
|
||||
@@ -606,7 +607,6 @@ function update_core_database($type = '')
|
||||
return update_needed("user/e_user.php need to be registered"); // NO LAN.
|
||||
}
|
||||
|
||||
e107::getPlug()->clearCache()->buildAddonPrefLists();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -168,6 +168,27 @@ class contact_shortcodes extends e_shortcode
|
||||
return "<input type='submit' name='send-contactus' value=\"".LANCONTACT_08."\" class='".$class."' />";
|
||||
}
|
||||
|
||||
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('<span class="%s"><a href="%s" target="_blank">%s</a></span>', $class, $pp, LANCONTACT_22);
|
||||
$text = e107::getParser()->lanVars(LANCONTACT_23, $link);
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
@@ -51,6 +51,12 @@ $CONTACT_TEMPLATE['menu'] = '
|
||||
<label for="contactBody" >'.LANCONTACT_06.'</label>
|
||||
{CONTACT_BODY=rows=5&cols=30}
|
||||
</div>
|
||||
<div class="form-group"><label for="gdpr">'.LANCONTACT_24.'</label>
|
||||
<div class="checkbox">
|
||||
<label>{CONTACT_GDPR_CHECK} '.LANCONTACT_21.'</label>
|
||||
<div class="help-block">{CONTACT_GDPR_LINK}</div>
|
||||
</div>
|
||||
</div>
|
||||
{CONTACT_SUBMIT_BUTTON}
|
||||
</div>
|
||||
';
|
||||
@@ -97,6 +103,15 @@ $CONTACT_TEMPLATE['menu'] = '
|
||||
{CONTACT_IMAGECODE}
|
||||
{CONTACT_IMAGECODE_INPUT}
|
||||
|
||||
<div class='form-group'><label for='gdpr'>".LANCONTACT_24."</label>
|
||||
<div class='checkbox'>
|
||||
<label>{CONTACT_GDPR_CHECK} ".LANCONTACT_21."</label>
|
||||
<div class='help-block'>{CONTACT_GDPR_LINK}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class='form-group'>
|
||||
{CONTACT_SUBMIT_BUTTON}
|
||||
</div>
|
||||
|
@@ -149,6 +149,8 @@
|
||||
<core name="frontpage_force"><![CDATA[array (
|
||||
0 => '',
|
||||
)]]></core>
|
||||
<core name="gdpr_privacypolicy"></core>
|
||||
<core name="gdpr_termsandconditions"></core>
|
||||
<core name="html_abuse">0</core>
|
||||
<core name="im_height">80</core>
|
||||
<core name="im_path">/usr/X11R6/bin/</core>
|
||||
|
@@ -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.).");
|
||||
|
@@ -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");
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user