]> git.mxchange.org Git - friendica.git/commitdiff
registration: added display of privacy statement if enabled
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sat, 19 May 2018 16:53:54 +0000 (18:53 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Sat, 19 May 2018 16:53:54 +0000 (18:53 +0200)
mod/register.php
view/templates/register.tpl
view/theme/frio/templates/register.tpl

index 9de7a0ca3800a7c4d7cdc8d78882cbcc2ca49514..cc1c8dc7d98707b7720fd8500ced01969e56cede 100644 (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")
        ]);
index eddc55132551d8ad79838511073f4c40796976bf..6be4208d3193afc1bbfa32d9ce49eb6217ac2124 100644 (file)
        {{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'}}" />
index 30ead3c4bb16117abaab5a207a467851a03582c5..670f5d11ef0ab6b8953a65223dfe45871520b0fe 100644 (file)
                {{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>