summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-10-16 03:05:34 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-10-16 03:05:34 +0200
commit1e243653241866a6a3e43d39cdbdb504f2467ca6 (patch)
tree5652270bc715fbba44cd84c2aaab6210c2947106
parent515754b9b7778f270ceb3e7cfc9e16176ae3795a (diff)
Add terms of service andpoint; reference it from registration and login forms
-rw-r--r--README.md1
-rwxr-xr-xlib/Travelynx.pm1
-rw-r--r--lib/Travelynx/Controller/Account.pm4
-rw-r--r--lib/Travelynx/Controller/Static.pm6
-rw-r--r--templates/login.html.ep5
-rw-r--r--templates/register.html.ep5
6 files changed, 21 insertions, 1 deletions
diff --git a/README.md b/README.md
index 17b7778..dd32d3b 100644
--- a/README.md
+++ b/README.md
@@ -126,6 +126,7 @@ privacy policy. For the sake of this readme, we assume that you are using the
The travelynx container does not contain a mail server, so it needs a
separate SMTP server to send mail. It does not receive mail.
* create local/imprint.html.ep and enter imprint as well as privacy policy data.
+* create local/terms-of-service.html.ep and enter your terms of service.
* Configure your web server to reverse-provy requests to the travelynx
instance. See `examples/nginx-site` for an nginx config.
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index f8ace80..f9199a5 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -2354,6 +2354,7 @@ sub startup {
$r->get('/changelog')->to('static#changelog');
$r->get('/impressum')->to('static#imprint');
$r->get('/imprint')->to('static#imprint');
+ $r->get('/tos')->to('static#tos');
$r->get('/legend')->to('static#legend');
$r->get('/offline.html')->to('static#offline');
$r->get('/api/v1/:user_action/:token')->to('api#get_v1');
diff --git a/lib/Travelynx/Controller/Account.pm b/lib/Travelynx/Controller/Account.pm
index 453664c..faaad0a 100644
--- a/lib/Travelynx/Controller/Account.pm
+++ b/lib/Travelynx/Controller/Account.pm
@@ -46,6 +46,7 @@ sub send_registration_mail {
my $ua = $self->req->headers->user_agent;
my $reg_url = $self->url_for('reg')->to_abs->scheme('https');
+ my $tos_url = $self->url_for('tos')->to_abs->scheme('https');
my $imprint_url = $self->url_for('impressum')->to_abs->scheme('https');
my $body = "Hallo, ${user}!\n\n";
@@ -54,7 +55,8 @@ sub send_registration_mail {
$body
.= "Falls die Registrierung von dir ausging, kannst du den Account unter\n";
$body .= "${reg_url}/${user_id}/${token}\n";
- $body .= "freischalten.\n\n";
+ $body .= "freischalten.\n";
+ $body .= "Beachte dabei die Nutzungsbedingungen: ${tos_url}\n\n";
$body
.= "Falls nicht, ignoriere diese Mail bitte. Nach etwa 48 Stunden wird deine\n";
$body
diff --git a/lib/Travelynx/Controller/Static.pm b/lib/Travelynx/Controller/Static.pm
index 04c2d0f..bcd6fda 100644
--- a/lib/Travelynx/Controller/Static.pm
+++ b/lib/Travelynx/Controller/Static.pm
@@ -35,4 +35,10 @@ sub offline {
$self->render('offline');
}
+sub tos {
+ my ($self) = @_;
+
+ $self->render('terms-of-service');
+}
+
1;
diff --git a/templates/login.html.ep b/templates/login.html.ep
index ce89813..e60ed24 100644
--- a/templates/login.html.ep
+++ b/templates/login.html.ep
@@ -74,6 +74,11 @@
</div>
</div>
<div class="row">
+ <div class="col s12 m12 l12">
+ Mit der Anmeldung stimmst du den <a href="/tos">Nutzungsbedingdungen</a> zu.
+ </div>
+ </div>
+ <div class="row">
<div class="col s3 m3 l3">
</div>
<div class="col s6 m6 l6 center-align">
diff --git a/templates/register.html.ep b/templates/register.html.ep
index ee344f9..cc47aa6 100644
--- a/templates/register.html.ep
+++ b/templates/register.html.ep
@@ -27,6 +27,11 @@
</div>
</div>
<div class="row">
+ <div class="col s12 m12 l12">
+ Mit deiner Registrierung stimmst du den <a href="/tos">Nutzungsbedingdungen</a> zu.
+ </div>
+ </div>
+ <div class="row">
<div class="col s3 m3 l3">
</div>
<div class="col s6 m6 l6 center-align">