registration: added display of privacy statement if enabled

This commit is contained in:
Tobias Diekershoff 2018-05-19 18:53:54 +02:00
parent ae62c1d1ea
commit dd629d5fa4
3 changed files with 17 additions and 0 deletions

View file

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

View file

@ -67,6 +67,12 @@
{{if $showtoslink}}
<p><a href="{{$baseurl}}/tos">{{$tostext}}</a></p>
{{/if}}
{{if $showprivstatement}}
<h4>{{$privstatement.0}}</h4>
{{for $i=1 to 3}}
<p>{{$privstatement[$i]}}</p>
{{/for}}
{{/if}}
<div id="register-submit-wrapper">
<input type="submit" name="submit" id="register-submit-button" value="{{$regbutt|escape:'html'}}" />

View file

@ -63,6 +63,12 @@
{{if $showtoslink}}
<p><a href="{{$baseurl}}/tos">{{$tostext}}</a></p>
{{/if}}
{{if $showprivstatement}}
<h4>{{$privstatement.0}}</h4>
{{for $i=1 to 3}}
<p>{{$privstatement[$i]}}</p>
{{/for}}
{{/if}}
<div id="register-submit-wrapper" class="pull-right">
<button type="submit" name="submit" id="register-submit-button" class="btn btn-primary" value="{{$regbutt|escape:'html'}}">{{$regbutt|escape:'html'}}</button>