From 9448a7721ecdcd1a8686517ce13457cbe59f6714 Mon Sep 17 00:00:00 2001 From: Kevin Joy Date: Mon, 6 Nov 2023 13:30:47 +0000 Subject: [PATCH] Fix for bottom paging next/previous buttons from losing usersearch querystring --- .../Pages/Admin/Users.cshtml | 10 +++++----- .../Pages/Admin/Users.cshtml.cs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/Admin/Users.cshtml b/dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/Admin/Users.cshtml index 1c5897637..238b71053 100644 --- a/dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/Admin/Users.cshtml +++ b/dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/Admin/Users.cshtml @@ -65,7 +65,7 @@ @if (Model.PreviousPage.HasValue) { - + } @for (int i = 0; i < Model.PaginationPages!.Length; i++) @@ -77,12 +77,12 @@ } - @item + @item } @if (Model.NextPage.HasValue) { - + } } @@ -124,12 +124,12 @@ @if (Model.PreviousPage.HasValue) { - + } @if (Model.NextPage.HasValue) { - + } } diff --git a/dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/Admin/Users.cshtml.cs b/dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/Admin/Users.cshtml.cs index 7f6b9819d..cd5e8fe28 100644 --- a/dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/Admin/Users.cshtml.cs +++ b/dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/Admin/Users.cshtml.cs @@ -108,13 +108,13 @@ public Dictionary GetPage(int pageNumber) var pageData = new Dictionary { { "PageNumber", pageNumber.ToString() }, + { "UserSearch", UserSearch ?? "" } }; for (var i = 0; i < LookupStatus!.Length; i++) { pageData.Add($"LookupStatus[{i}]", LookupStatus[i].ToString()!); } - return pageData; }