From 0516344ac09214ca8dde0fe0d9fa7b7832213ef0 Mon Sep 17 00:00:00 2001 From: Derf Null Date: Fri, 9 Jun 2023 07:55:59 +0200 Subject: [PATCH] login form: add hint about pages being only visibile after login --- lib/Travelynx.pm | 6 +++++- templates/login.html.ep | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 0eeab09..0f602fe 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -2229,7 +2229,11 @@ sub startup { if ( $self->is_user_authenticated ) { return 1; } - $self->render( 'login', redirect_to => $self->req->url ); + $self->render( + 'login', + redirect_to => $self->req->url, + from => 'auth_required' + ); return undef; } ); diff --git a/templates/login.html.ep b/templates/login.html.ep index 7b225ec..a8d7296 100644 --- a/templates/login.html.ep +++ b/templates/login.html.ep @@ -44,6 +44,15 @@ % } + % elsif ($from eq 'auth_required') { +
+
+ Login notwendig +

Die aufgerufene Seite ist nur mit travelynx-Account zugänglich.

+

Über travelynx · Registrieren

+
+
+ % } % }