mirror of
https://github.com/e107inc/e107.git
synced 2025-04-19 20:21:51 +02:00
fixes #3579 shortcodes, lans for GDPR links on signup page.
Added shortcodes and lans to display GDPR links on signup page. Updated signup template
This commit is contained in:
parent
b22498e3e4
commit
6ce8972337
@ -609,6 +609,53 @@ class signup_shortcodes extends e_shortcode
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Privacy policy link
|
||||
* @example {SIGNUP_GDPR_PRIVACYPOLICY_LINK}
|
||||
* @example {SIGNUP_GDPR_PRIVACYPOLICY_LINK: class=label label-info}
|
||||
*/
|
||||
function sc_signup_gdpr_privacypolicy_link($parm='')
|
||||
{
|
||||
$pp = e107::getPref('gdpr_privacypolicy', '');
|
||||
if (!$pp)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
$pp = e107::getParser()->replaceConstants($pp, 'full');
|
||||
$class = (!empty($parm['class'])) ? $parm['class'] : '';
|
||||
$text = sprintf('<span class="%s"><a href="%s" target="_blank">%s</a></span>', $class, $pp, LAN_SIGNUP_122);
|
||||
return $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Terms and conditions link
|
||||
* @example {SIGNUP_GDPR_TERMSANDCONDITIONS_LINK}
|
||||
* @example {SIGNUP_GDPR_TERMSANDCONDITIONS_LINK: class=label label-info}
|
||||
*/
|
||||
function sc_signup_gdpr_termsandconditions_link($parm='')
|
||||
{
|
||||
$pp = e107::getPref('gdpr_termsandconditions', '');
|
||||
if (!$pp)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
$pp = e107::getParser()->replaceConstants($pp, 'full');
|
||||
$class = (!empty($parm['class'])) ? $parm['class'] : '';
|
||||
$text = sprintf('<span class="%s"><a href="%s" target="_blank">%s</a></span>', $class, $pp, LAN_SIGNUP_123);
|
||||
return $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print message "By signing up you agree to our Privacy policy and our Terms and conditions."
|
||||
* @example {SIGNUP_GDPR_INFO}
|
||||
*/
|
||||
function sc_signup_gdpr_info()
|
||||
{
|
||||
$text = e107::getParser()->lanVars(LAN_SIGNUP_124,
|
||||
array($this->sc_signup_gdpr_privacypolicy_link(), $this->sc_signup_gdpr_termsandconditions_link()));
|
||||
return $text;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -243,6 +243,13 @@ if(!defined($SIGNUP_BODY))
|
||||
{SIGNUP_SIGNATURE}
|
||||
{SIGNUP_IMAGES}
|
||||
{SIGNUP_IMAGECODE}
|
||||
|
||||
<tr style='vertical-align:top'>
|
||||
<td class='forumheader' colspan='2' style='text-align:center'>
|
||||
{SIGNUP_GDPR_INFO}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr style='vertical-align:top'>
|
||||
<td class='forumheader' colspan='2' style='text-align:center'>
|
||||
<input class='button btn btn-success' type='submit' name='register' value=\"".LAN_SIGNUP_79."\" />
|
||||
|
@ -161,3 +161,7 @@ define("LAN_SIGNUP_118", "To [x]");
|
||||
define("LAN_SIGNUP_119", "Don't send email");
|
||||
define("LAN_SIGNUP_120", "OR");
|
||||
define("LAN_SIGNUP_121", "Use a different email address");
|
||||
|
||||
define("LAN_SIGNUP_122", "Privacy Policy");
|
||||
define("LAN_SIGNUP_123", "Terms and conditions");
|
||||
define("LAN_SIGNUP_124", "By signing up you agree to our [x] and our [y].");
|
||||
|
Loading…
x
Reference in New Issue
Block a user