aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2019-09-13 17:33:18 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2019-09-17 09:21:23 +0200
commita2ed6626c2f4e85878f775abcac897a1fd3a1f42 (patch)
tree6a12718165c7d054107c587e2b34cdc25c3cc7e7 /app/views
parent80590daeb3627e5712be15fdc4bd98f0e2c40ea5 (diff)
Add support for terms of service
This feature is optional. It is based on the presence of a `data/tos.html` file that an administrator can create. If this file exists, FreshRSS will automatically add a "ToS" checkbox on the registration page that users must check to be able to create their account.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/auth/register.phtml9
-rw-r--r--app/views/index/tos.phtml13
2 files changed, 22 insertions, 0 deletions
diff --git a/app/views/auth/register.phtml b/app/views/auth/register.phtml
index 87582a2d0..b90950510 100644
--- a/app/views/auth/register.phtml
+++ b/app/views/auth/register.phtml
@@ -26,6 +26,15 @@
<noscript><b><?php echo _t('gen.js.should_be_activated'); ?></b></noscript>
</div>
+ <?php if ($this->show_tos_checkbox) { ?>
+ <div>
+ <label class="checkbox" for="accept-tos">
+ <input type="checkbox" name="accept_tos" id="accept-tos" value="1" required />
+ <?php echo _t('gen.auth.accept_tos', _url('index', 'tos')); ?>
+ </label>
+ </div>
+ <?php } ?>
+
<div>
<?php
$redirect_url = urlencode(Minz_Url::display(
diff --git a/app/views/index/tos.phtml b/app/views/index/tos.phtml
new file mode 100644
index 000000000..79c597244
--- /dev/null
+++ b/app/views/index/tos.phtml
@@ -0,0 +1,13 @@
+<div class="post content">
+ <?php if ($this->can_register) { ?>
+ <a href="<?php echo _url('auth', 'register'); ?>">
+ <?php echo _t('gen.action.back'); ?>
+ </a>
+ <?php } else { ?>
+ <a href="<?php echo _url('index', 'index'); ?>">
+ <?php echo _t('gen.action.back'); ?>
+ </a>
+ <?php } ?>
+
+ <?php echo $this->terms_of_service; ?>
+</div>