From dd629d5fa429e5c0cd152fd7f9449fefbbad68db Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 19 May 2018 18:53:54 +0200 Subject: [PATCH] registration: added display of privacy statement if enabled --- mod/register.php | 5 +++++ view/templates/register.tpl | 6 ++++++ view/theme/frio/templates/register.tpl | 6 ++++++ 3 files changed, 17 insertions(+) diff --git a/mod/register.php b/mod/register.php index 9de7a0ca38..cc1c8dc7d9 100644 --- a/mod/register.php +++ b/mod/register.php @@ -12,6 +12,7 @@ use Friendica\Core\PConfig; use Friendica\Core\System; use Friendica\Core\Worker; use Friendica\Model\User; +use Friendica\Module\Tos; use Friendica\Util\DateTimeFormat; require_once 'include/enotify.php'; @@ -252,6 +253,8 @@ function register_content(App $a) $tpl = $arr['template']; + $tos = new Tos(); + $o = replace_macros($tpl, [ '$oidhtml' => $oidhtml, '$invitations' => Config::get('system', 'invitation_only'), @@ -286,6 +289,8 @@ function register_content(App $a) '$importt' => L10n::t('Import your profile to this friendica instance'), '$showtoslink' => Config::get('system', 'tosdisplay'), '$tostext' => L10n::t('Terms of Service'), + '$showprivstatement' => Config::get('system', 'tosprivstatement'), + '$privstatement' => $tos->privblock, '$baseurl' => System::baseurl(), '$form_security_token' => get_form_security_token("register") ]); diff --git a/view/templates/register.tpl b/view/templates/register.tpl index eddc551325..6be4208d31 100644 --- a/view/templates/register.tpl +++ b/view/templates/register.tpl @@ -67,6 +67,12 @@ {{if $showtoslink}}

{{$tostext}}

{{/if}} + {{if $showprivstatement}} +

{{$privstatement.0}}

+ {{for $i=1 to 3}} +

{{$privstatement[$i]}}

+ {{/for}} + {{/if}}
diff --git a/view/theme/frio/templates/register.tpl b/view/theme/frio/templates/register.tpl index 30ead3c4bb..670f5d11ef 100644 --- a/view/theme/frio/templates/register.tpl +++ b/view/theme/frio/templates/register.tpl @@ -63,6 +63,12 @@ {{if $showtoslink}}

{{$tostext}}

{{/if}} + {{if $showprivstatement}} +

{{$privstatement.0}}

+ {{for $i=1 to 3}} +

{{$privstatement[$i]}}

+ {{/for}} + {{/if}}
-- 2.39.5