From ac6625a80c5b3e35a2a5dff345df508eece8e22a Mon Sep 17 00:00:00 2001 From: Chriztian Steinmeier Date: Sun, 23 Jun 2019 13:07:43 +0200 Subject: [PATCH] Handle `loginModel.RedirectUrl` in Login partial (#5587) --- .../Umbraco/PartialViewMacros/Templates/Login.cshtml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Login.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Login.cshtml index 31a3bd604d..af84a603db 100644 --- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Login.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Login.cshtml @@ -1,4 +1,4 @@ -@using System.Web.Mvc.Html +@using System.Web.Mvc.Html @using ClientDependency.Core.Mvc @using Umbraco.Web @using Umbraco.Web.Models @@ -7,6 +7,7 @@ @{ var loginModel = new LoginModel(); + loginModel.RedirectUrl = HttpContext.Current.Request.Url.AbsolutePath; Html.EnableClientValidation(); Html.EnableUnobtrusiveJavaScript(); @@ -20,6 +21,7 @@ @using (Html.BeginUmbracoForm("HandleLogin")) { + @Html.HiddenFor(m => loginModel.RedirectUrl)
Login