summaryrefslogtreecommitdiff
path: root/templates/login.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-03-10 19:32:45 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-03-10 19:32:45 +0100
commit5970a5a350890340821a5418f3aa4607e05f49cb (patch)
treedb97fe2421a3fd1d354481ef8d6e5224094486ca /templates/login.html.ep
parentc27c108f4862f5dcbf42cf8f403807d7cbb009f1 (diff)
redirect users after login to protected page
Diffstat (limited to 'templates/login.html.ep')
-rw-r--r--templates/login.html.ep3
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/login.html.ep b/templates/login.html.ep
index fc8bbb8..4c5696d 100644
--- a/templates/login.html.ep
+++ b/templates/login.html.ep
@@ -76,6 +76,9 @@
<div class="row">
%= form_for '/login' => (class => 'col s12', method => 'POST') => begin
%= csrf_field
+ % if (stash('redirect_to')) {
+ %= hidden_field 'redirect_to' => $redirect_to
+ % }
<div class="row">
<div class="input-field col s12">
<i class="material-icons prefix">account_circle</i>