Add link to privacy policy into the leaving message form

This commit is contained in:
Fedor A. Fetisov 2018-10-17 21:41:02 +03:00
parent bc99761b7a
commit d41db57211
2 changed files with 11 additions and 0 deletions

View File

@ -178,6 +178,12 @@ function setup_leavemessage($name, $email, $group_id, $info, $referrer)
'title' => $data['page.title']
);
// Set privacy policy link (if needed)
if (Settings::get('enableprivacypolicy')
&& strcmp('', Settings::get('privacypolicy'))) {
$data['leaveMessage']['leaveMessageForm']['privacyPolicyUrl'] = Settings::get('privacypolicy');
}
if (Settings::get('enablegroups') == '1') {
$data['leaveMessage']['leaveMessageForm']['groups']
= prepare_groups_select($group_id);

View File

@ -45,6 +45,11 @@
<td><input type="text" name="captcha" size="50" maxlength="15" value="" class="username"/></td>
</tr>
{{/if}}
{{#if privacyPolicyUrl}}
<tr>
<td colspan="2"><strong>{{{l10n "Please note that by leaving the message you're explicitly agree with the <a href=\"{0}\" target=\"_blank\">Privacy Policy</a>" privacyPolicyUrl}}}</strong></td>
</tr>
{{/if}}
</table>
<a href="javascript:void(0);" class="but" id="send-message">{{l10n "Send"}}</a>
<div class="clear">&nbsp;</div>