From daa6f454b23f62d55bd44b48bbf3d49fd66b559f 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 %}