From 814c50f46101deb77e9bf2b71c4b1663a6ed953b Mon Sep 17 00:00:00 2001 From: dansheps Date: Thu, 30 May 2019 12:01:41 -0500 Subject: [PATCH] Fix #3228 - UrlEncode full path for next if not on logon page Include the full path for the ?next= variable in login links if we are not on the logon page. Additionally include next for post requests that have the next variable set (will only come from the login page itself generally) --- netbox/templates/inc/nav_menu.html | 7 ++++++- netbox/templates/login.html | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/netbox/templates/inc/nav_menu.html b/netbox/templates/inc/nav_menu.html index 5f8f371d3..177e5df58 100644 --- a/netbox/templates/inc/nav_menu.html +++ b/netbox/templates/inc/nav_menu.html @@ -413,7 +413,12 @@ {% else %} -
  • Log in
  • + {% url 'login' as login_url %} + {% if request.path == login_url %} +
  • Log in
  • + {% else %} +
  • Log in
  • + {% endif %} {% endif %}