1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 14:17:49 +02:00

fixes #3375 added GDPR Agreement checkbox to contact form (incl. Lans)

This commit is contained in:
Achim Ennenbach
2018-08-27 20:12:54 +02:00
parent c165fad9f0
commit 986633d117
3 changed files with 40 additions and 0 deletions

View File

@@ -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('contact_privacypolicy', '');
if (!$pp)
{
return '';
}
$class = (!empty($parm['class'])) ? $parm['class'] : '';
$link = e107::getParser()->lanVars('<span class="[x]"><a href="[y]" target="_blank">[z]</a></span>', array($class, $pp, LANCONTACT_22));
$text = e107::getParser()->lanVars(LANCONTACT_23, $link);
return $text;
}
}
?>

View File

@@ -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>

View File

@@ -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");