diff options
Diffstat (limited to 'templates/login.qtpl')
-rw-r--r-- | templates/login.qtpl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/templates/login.qtpl b/templates/login.qtpl index 7815bd7..efaf329 100644 --- a/templates/login.qtpl +++ b/templates/login.qtpl @@ -2,6 +2,7 @@ {% code type LoginPage struct { + Referer string ErrorMessage string } %} @@ -13,7 +14,11 @@ type LoginPage struct { {% func (p *LoginPage) Content(ctx context.Context) %} <div class="row"> <div class="col-md-6 offset-md-3"> + {% if p.Referer == "" %} <form action="/login/" method="POST"> + {% else %} + <form action="/login/?referer={%s p.Referer %}" method="POST"> + {% endif %} <div class="form-group m-3"> <label for="username" class="form-label">Username</label> <input type="text" class="form-control" name="username" id="username"> |