diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 6 | ||||
-rw-r--r-- | templates/login.html | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/templates/base.html b/templates/base.html index 9f45c87..c48d1c3 100644 --- a/templates/base.html +++ b/templates/base.html @@ -25,7 +25,11 @@ <a href="{{ url_for('new_project_form') }}">New Project</a> {% block admin_footer %}{% endblock %} {% else %} - <a href="{{ url_for('login') }}">Admin login</a> + {% if no_login %} + <a href="{{ return_url }}">Go back</a> + {% else %} + <a href="{{ url_for('login') }}?return_url={{ request.path }}">Admin login</a> + {% endif %} {% endif %} {% block footer %} {% endblock %} diff --git a/templates/login.html b/templates/login.html index 32059c6..14a22e9 100644 --- a/templates/login.html +++ b/templates/login.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% block body %} - <form method="post" action="{{ url_for('check_login') }}"> + <form method="post" action="{{ url_for('check_login') }}?return_url={{ return_url }}"> <p style="color: red;">Admin access only</p> <p> <label for="user">Username</label> |