diff --git a/Modules/UserManager/App_LocalResources/UserRoles.resx b/Modules/UserManager/App_LocalResources/UserRoles.resx index 85be409..dab0499 100644 --- a/Modules/UserManager/App_LocalResources/UserRoles.resx +++ b/Modules/UserManager/App_LocalResources/UserRoles.resx @@ -153,6 +153,9 @@ Ok + + Please enter a valid page number between 1 and + ROLE diff --git a/Modules/UserManager/Module.css b/Modules/UserManager/Module.css index 8f52260..8da9a94 100644 --- a/Modules/UserManager/Module.css +++ b/Modules/UserManager/Module.css @@ -1,119 +1,146 @@ -#table { - font-family: Arial, Helvetica, sans-serif; - border-collapse: collapse; - width: 100%; +.admin-manager { + margin-left: 5px; + margin-right: 5px; } - #table td, #table th { - border: 1px solid #ddd; - padding: 8px; + .admin-manager .table { + font-family: Arial, Helvetica, sans-serif; + border-collapse: collapse; + width: 100%; + } + + .admin-manager .table td, + .admin-manager .table th { + border: 1px solid #ddd; + padding: 8px; + } + + .admin-manager .table tr:nth-child(even) { + background-color: #fafafa42; + } + + .admin-manager .table tr:hover { + background-color: #ddd; + } + + .admin-manager .dark-brown { + color: #ba9545; } - #table tr:nth-child(even) { - background-color: #f2f2f2; + .admin-manager .red { + color: red; } - #table tr:hover { - background-color: #ddd; + .admin-manager .yellowgreen { + color: yellowgreen; } - #table th { - padding-top: 12px; - padding-bottom: 12px; - text-align: left; + .admin-manager .background-dark-brown { background-color: #6d5a2c; - color: white; } -#title { - color: #6d5a2c; -} + .admin-manager table.table tr.background-dark-brown:hover { + background-color: #6d5a2c; + color: #ffffff; + } -#subtitle { - color: #ba9545; -} + .admin-manager .background-color-gray { + background: #e4e4e4d4; + } -.input-group input[type=text] { - width: 100px; - box-sizing: border-box; - border-radius: 8px; - font-size: 16px; - background-color: white; - background-position: 10px 10px; - background-repeat: no-repeat; - padding: 6px; - transition: width 0.4s ease-in-out; - box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); -} + .admin-manager .input-group input[type="text"] { + box-sizing: border-box; + border-radius: 8px; + background-color: white; + background-position: 10px 10px; + background-repeat: no-repeat; + padding: 6px; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); + } + + .admin-manager .input-group input[type="text"]:focus { + width: 250px; + } + + .admin-manager .input-group { + display: flex; + align-items: center; + } + + .admin-manager .input-group .form-control { + flex: 1; + box-shadow: 0 0 3px 0 #888888; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + margin: 0; + } - .input-group input[type=text]:focus { - width: 250px; + .admin-manager .input-group-btn { + margin-right: -1px; } -.formItem { +.input-group-btn .AM-btn .AM-btn-primary { + height: 40px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + margin: 0; +} + +.admin-manager .formItem { margin-top: 20px; - font-size: 16px; } - .formItem input { + .admin-manager .formItem input { width: 95%; box-sizing: border-box; border: 2px solid #ccc; border-radius: 4px; - font-size: 16px; padding: 3px; - box-shadow: 0 1px 6px 0 rgba(0,0,0,0.2), 0 2px 8px 0 rgba(0,0,0,0.19); + box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.2), 0 2px 8px 0 rgba(0, 0, 0, 0.19); margin-top: 3px; } -.buttomForm button { +.admin-manager .buttomForm button { border: none; padding: 12px 30px; text-align: center; text-decoration: none; display: inline-block; - font-size: 16px; margin: 4px 2px; cursor: pointer; - box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19); + box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); border-radius: 8px; } -.cancel-buttom { +.admin-manager .cancel-buttom { border: none; background-color: grey; padding: 12px 30px; text-align: center; text-decoration: none; display: inline-block; - font-size: 16px; margin: 4px 2px; cursor: pointer; - box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19); + box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); border-radius: 8px; } -.buttomForm .primary { - background-color: #008CBA; +.admin-manager .buttomForm .primary { + background-color: #008cba; } -.buttomForm .disabled { +.admin-manager .disabled { background-color: #b4babc; pointer-events: none; opacity: 0.65; cursor: not-allowed; } -.buttomForm #cancelEdit { - -} - -.checkbox { - font-size: 16px; +.admin-manager .checkbox { margin-top: 20px; } -#checkbox { +.admin-manager #checkbox { margin-top: 20px; margin-bottom: 20px; height: 20px; @@ -121,52 +148,56 @@ border-radius: 50%; } -.left { +.admin-manager .left { float: left; margin: 2px; } -.right { +.admin-manager .right { float: right; margin: 2px; } -.center { +.admin-manager .center { margin: auto; width: 60%; text-align: center; } -.right { +.admin-manager .right { margin: auto; width: 60%; text-align: right; } -.white-color { +.admin-manager .white-color { color: white; } -.text-align-center { +.admin-manager .text-align-center { text-align: center; } -.text-align-left { +.admin-manager .text-align-left { text-align: left; } -.text-align-right { +.admin-manager .text-align-right { text-align: right !important; } -.text-align-justify { +.admin-manager .text-align-justify { text-align: justify; } -.float-right { +.admin-manager .float-right { float: right !important; } +.m10 { + margin: 10px; +} + .ml5 { margin-left: 5px; } @@ -179,6 +210,22 @@ margin-left: 30px; } +.mr2 { + margin-right: 2px !important; +} + +.mr5 { + margin-right: 5px !important; +} + +.mt0 { + margin-top: 0 !important; +} + +.mt1 { + margin-top: 1px !important; +} + .mt5 { margin-top: 5px; } @@ -191,6 +238,14 @@ margin-top: 35px; } +.mb15 { + margin-bottom: 15px; +} + +.mb25 { + margin-bottom: 25px; +} + .pb10 { padding-bottom: 10px !important; } @@ -199,155 +254,402 @@ padding: 1px 1 !important; } -.accountSettings { +.p7 { + padding: 7px 7px !important; +} + +.pl0 { + padding-left: 0 !important; +} + +.pr0 { + padding-right: 0 !important; +} + +.admin-manager .accountSettings { margin-left: 10px !important; } - .accountSettings img { + .admin-manager .accountSettings img { border-radius: 50% !important; } -.accountData { +.admin-manager .accountData { margin-left: 10px !important; margin-top: 30px !important; } /* Grid System */ -.row::after { - content: ""; - display: table; -} - -.pl2 { +.admin-manager .pl2 { padding-left: 2px !important; } -.pr2 { +.admin-manager .pr2 { padding-right: 2px !important; } -[class*="col-"] { +.admin-manager [class*="col-"] { float: left; + box-sizing: border-box; + width: 100%; /* Default to 100% width for small screens */ } -.col-1 { - width: 8.33%; -} +/* Medium devices (tablets, 768px and up) */ +@media (min-width: 768px) { + .admin-manager .col-md-1 { + width: calc(8.33%); + } + + .admin-manager .col-md-2 { + width: calc(16.66%); + } + + .admin-manager .col-md-3 { + width: calc(25%); + } + + .admin-manager .col-md-4 { + width: calc(33.33%); + } + + .admin-manager .col-md-5 { + width: calc(41.66%); + } + + .admin-manager .col-md-6 { + width: calc(50%); + } + + .admin-manager .col-md-7 { + width: calc(58.33%); + } + + .admin-manager .col-md-8 { + width: calc(66.66%); + } + + .admin-manager .col-md-9 { + width: calc(75%); + } + + .admin-manager .col-md-10 { + width: calc(83.33%); + } + + .admin-manager .col-md-11 { + width: calc(91.66%); + } -.col-2 { - width: 16.66%; + .admin-manager .col-md-12 { + width: calc(100%); + } } +/* Grid System */ -.col-3 { - width: 25%; +.admin-manager .input-group input { + box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); } -.col-4 { - width: 33.33%; +.admin-manager .box-shadow { + height: 40px; + box-shadow: 0 0 8px 0 #888888; } -.col-5 { - width: 41.66%; +.admin-manager .paginationStyle { + display: inline-block; + padding-left: 0; + margin: 0px !important; + border-radius: 4px; } -.col-6 { - width: 50%; +.admin-manager .data-footer { + display: flex; + flex-wrap: wrap; + align-items: center; + padding: 0 8px; } -.col-7 { - width: 58.33%; +.admin-manager .navbar-default { + background-color: #ffffff00 !important; + border-color: #ffffff0a !important; } -.col-8 { - width: 66.66%; +.admin-manager .color-white { + color: white !important; } -.col-9 { - width: 75%; +.admin-manager .color-black { + color: black !important; } -.col-10 { - width: 83.33%; +/* version 1.01.02 additions */ +.admin-manager .field-validation-error { + color: darkred; + font-size: small; } -.col-11 { - width: 91.66%; +.admin-manager .datepicker-dropdown.datepicker-orient-left:after { + left: 50% !important; } -.col-12 { - width: 100%; +.admin-manager .datepicker-dropdown.datepicker-orient-top:before { + border-top: 0 solid rgba(0, 0, 0, 0.15) !important; } -/* Grid System */ -.dropDownList { +.admin-manager .dropDownList { box-sizing: border-box; border: 2px solid #ccc; border-radius: 4px; padding: 9px; - box-shadow: 0 1px 6px 0 rgba(0,0,0,0.2), 0 2px 8px 0 rgba(0,0,0,0.19); - font-size: 16px; + box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.2), 0 2px 8px 0 rgba(0, 0, 0, 0.19); border-radius: 10px; } -.dropDown { +.admin-manager .dropDown { display: flex; height: 40px; background: #e4e4e4d4; color: black; padding: 20px !important; - font-size: 16px !important; border-radius: 8px !important; align-items: center !important; box-shadow: 0 0 5px rgba(0, 0, 0, 0.1) !important; } -.input-group input { - box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); +.admin-manager .dropdown { + position: relative; + display: inline-block; } -.box-shadow { - height: 40px; - box-shadow: 0 0 8px 0 #888888 +.admin-manager .dropdown-content { + display: none; + position: absolute; + background-color: #f9f9f9; + min-width: 160px; + box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); + z-index: 1; +} + + .admin-manager .dropdown-content a { + color: black; + padding: 12px 16px; + text-decoration: none; + display: block; + } + + .admin-manager .dropdown-content a:hover { + background-color: #f1f1f1; + } + +.admin-manager .dropdown:hover .dropdown-content { + display: block; +} + +.admin-manager .dropdown:hover .dropbtn { + background-color: #3e8e41; +} + +.admin-manager .AM-d-flex { + display: flex; +} + +.admin-manager .AM-justify-content-center { + justify-content: center; +} + +.admin-manager .AM-justify-content-end { + justify-content: flex-end; +} + +.custom-input-group { + display: flex; + align-items: center; + justify-content: center; } -.paginationStyle { +.admin-manager .dnnActions { + padding-top: 0%; +} + +.admin-manager .line-height-normal { + line-height: normal; +} + +.admin-manager .custom-disabled { + pointer-events: none; + opacity: 0.5; +} + +.AM-btn { + padding: 0.25rem 0.5rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: transparent; + border: 1px solid transparent; + border-radius: 0.375rem; display: inline-block; - padding-left: 0; - margin: 0px !important; + text-align: center; + text-decoration: none; + vertical-align: middle; + cursor: pointer; + user-select: none; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +.AM-btn-sm { + padding: 0.25rem 0.5rem !important; +} + +.AM-btn-medium { + padding: 0.375rem 0.75rem; +} + +.AM-btn-large { + padding: 0.5rem 1rem; +} + +.AM-btn-primary { + color: #fff; + background-color: #00539b; + border-color: #00539b; +} + + .AM-btn-primary:hover { + color: #fff; + background-color: #00539b8f; + border-color: #00539b8f; + } + +.AM-btn-default { + color: white; + background-color: #adadad; + border-color: #adadad; +} + + .AM-btn-default:hover { + background-color: #adadadba; + border-color: #adadadba; + } + + .AM-btn-default:disabled { + background-color: #e6e6e6; + border-color: #ccc; + cursor: not-allowed; + opacity: 0.65; + } + +.AM-btn-danger { + color: white; + background-color: #dc3545; + border-color: #dc3545; +} + + .AM-btn-danger:hover { + color: white; + background-color: #dc35459c; + border-color: #dc35459c; + } + +.AM-btn-info { + color: white; + background-color: #25cff2; + border-color: #25cff2; +} + +.AM-btn-info { + color: white; + background-color: #25cff2; + border-color: #25cff2; +} + +.AM-search-input { + height: 40px; + margin-bottom: 5px; + padding: 7px; +} + +/* Styles for the alert */ +.AM-alert { + padding: 15px; + margin-bottom: 20px; + border: 1px solid transparent; border-radius: 4px; + position: relative; +} + +.AM-alert-danger { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; } -.data-footer { +.AM-alert .close { + position: absolute; + top: 10px; + right: 10px; + color: inherit; + background: none; + border: none; + font-size: 20px; + cursor: pointer; +} + +.AM-hidden { + display: none; +} + +.admin-manager .input-group { + position: relative; display: flex; flex-wrap: wrap; + align-items: stretch; + width: 100%; +} + +.admin-manager .input-group-addon { + padding: 0.375rem 0.75rem; + margin-left: -1px; + display: flex; align-items: center; - font-size: 16px !important; - padding: 0 8px; + border: 1px solid #ced4da; + border-radius: 0.2rem; } -.navbar-default { - background-color: #ffffff00 !important; - border-color: #ffffff0a !important; +.AM-width-auto { + width: auto !important; } -.color-white { - color: white !important; +.centerInTable { + text-align: center; } -.color-black { - color: black !important; +.AM-input-group { + display: flex; + align-items: center; + margin-bottom: 1rem; } -/* version 1.01.02 additions */ -.field-validation-error { - color: darkred; - font-size: small; +.AM-input-group-btn { + margin-right: -1px; } -.datepicker-dropdown.datepicker-orient-left:after { - left: 50% !important; +.AM-input-group .AM-btn, +.AM-input-group .form-control { + height: 38px; + padding: 6px 12px; + border: 1px solid #ccc; } -.datepicker-dropdown.datepicker-orient-top:before { - border-top: 0 solid rgba(0, 0, 0, .15) !important; -} \ No newline at end of file +.AM-input-group .AM-btn { + margin-left: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.AM-input-group .form-control { + flex: 1; + line-height: 26px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} diff --git a/Modules/UserManager/Properties/AssemblyInfo.cs b/Modules/UserManager/Properties/AssemblyInfo.cs index 3f49a87..66ca5b3 100644 --- a/Modules/UserManager/Properties/AssemblyInfo.cs +++ b/Modules/UserManager/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("01.02.00")] -[assembly: AssemblyFileVersion("01.02.00")] +[assembly: AssemblyVersion("01.03.00")] +[assembly: AssemblyFileVersion("01.03.00")] diff --git a/Modules/UserManager/Providers/DataProviders/SqlDataProvider/01.01.01.SqlDataProvider b/Modules/UserManager/Providers/DataProviders/SqlDataProvider/01.01.01.SqlDataProvider index b93c2d3..3f3a894 100644 --- a/Modules/UserManager/Providers/DataProviders/SqlDataProvider/01.01.01.SqlDataProvider +++ b/Modules/UserManager/Providers/DataProviders/SqlDataProvider/01.01.01.SqlDataProvider @@ -47,10 +47,10 @@ BEGIN SELECT @TotalRecords = COUNT(*) FROM [dbo].[Users] u LEFT JOIN [dbo].[UserPortals] up ON u.UserID = up.UserID - WHERE (u.[UserName] LIKE '%' + @SearchTerm + '%' OR - u.[FirstName] LIKE '%' + @SearchTerm + '%' OR - u.[Email] LIKE '%' + @SearchTerm + '%' OR - u.[DisplayName] LIKE '%' + @SearchTerm) + WHERE (LOWER(u.[UserName]) LIKE '%' + LOWER(@SearchTerm) + '%' OR + LOWER(u.[FirstName]) LIKE '%' + LOWER(@SearchTerm) + '%' OR + LOWER(u.[Email]) LIKE '%' + LOWER(@SearchTerm) + '%' OR + LOWER(u.[DisplayName]) LIKE '%' + LOWER(@SearchTerm) + '%') AND u.IsDeleted = 0 AND (@IsSuperUser IS NULL OR u.IsSuperUser = @IsSuperUser) AND (@Deleted IS NULL OR up.IsDeleted = @Deleted) @@ -62,10 +62,10 @@ BEGIN SELECT @TotalRecords = COUNT(*) FROM [dbo].[Users] u LEFT JOIN [dbo].[UserPortals] up ON u.UserID = up.UserID - WHERE (u.[UserName] LIKE '%' + @SearchTerm + '%' OR - u.[FirstName] LIKE '%' + @SearchTerm + '%' OR - u.[Email] LIKE '%' + @SearchTerm + '%' OR - u.[DisplayName] LIKE '%' + @SearchTerm) + WHERE (LOWER(u.[UserName]) LIKE '%' + LOWER(@SearchTerm) + '%' OR + LOWER(u.[FirstName]) LIKE '%' + LOWER(@SearchTerm) + '%' OR + LOWER(u.[Email]) LIKE '%' + LOWER(@SearchTerm) + '%' OR + LOWER(u.[DisplayName]) LIKE '%' + LOWER(@SearchTerm) + '%') AND (@PortalId IS NULL OR up.PortalId = @PortalId); END; @@ -86,10 +86,10 @@ BEGIN FROM [dbo].[Users] u LEFT JOIN [dbo].[UserPortals] up ON u.UserID = up.UserID WHERE - (u.[UserName] LIKE '%' + @SearchTerm + '%' OR - u.[FirstName] LIKE '%' + @SearchTerm + '%' OR - u.[Email] LIKE '%' + @SearchTerm + '%' OR - u.[DisplayName] LIKE '%' + @SearchTerm) + (LOWER(u.[UserName]) LIKE '%' + LOWER(@SearchTerm) + '%' OR + LOWER(u.[FirstName]) LIKE '%' + LOWER(@SearchTerm) + '%' OR + LOWER(u.[Email]) LIKE '%' + LOWER(@SearchTerm) + '%' OR + LOWER(u.[DisplayName]) LIKE '%' + LOWER(@SearchTerm) + '%') AND u.IsDeleted = 0 AND (@IsSuperUser IS NULL OR u.IsSuperUser = @IsSuperUser) AND (@Deleted IS NULL OR up.IsDeleted = @Deleted) diff --git a/Modules/UserManager/Upendo.UserManager.dnn b/Modules/UserManager/Upendo.UserManager.dnn index 0c86915..990f6f4 100644 --- a/Modules/UserManager/Upendo.UserManager.dnn +++ b/Modules/UserManager/Upendo.UserManager.dnn @@ -1,7 +1,7 @@  - + Upendo DNN User Manager The Upendo DNN User Manager empowers authorized end-users in your DNN website to be able to manage user accounts and their assigned security roles.

]]>
DesktopModules/MVC/Upendo.Modules.UserManager/Images/logo.png @@ -60,7 +60,7 @@ Upendo.Modules.UserManager.Components.UserManagerController, Upendo.Modules.UserManager [DESKTOPMODULEID] - 01.00.00,01.01.00,01.01.01,01.02.00 + 01.00.00,01.01.00,01.01.01,01.02.00,01.03.00 @@ -69,7 +69,7 @@ Upendo.Modules.UserManager.dll bin - 01.02.00 + 01.03.00 @@ -92,7 +92,7 @@ diff --git a/Modules/UserManager/Upendo.UserManager_Symbols.dnn b/Modules/UserManager/Upendo.UserManager_Symbols.dnn index 7abbfca..8f86479 100644 --- a/Modules/UserManager/Upendo.UserManager_Symbols.dnn +++ b/Modules/UserManager/Upendo.UserManager_Symbols.dnn @@ -1,7 +1,7 @@  - + Upendo DNN User Manager Symbols @@ -14,7 +14,7 @@ True - Upendo.Modules.UserManager + Upendo.Modules.UserManager diff --git a/Modules/UserManager/Utility/Functions.cs b/Modules/UserManager/Utility/Functions.cs index d9f7685..0bbd283 100644 --- a/Modules/UserManager/Utility/Functions.cs +++ b/Modules/UserManager/Utility/Functions.cs @@ -216,9 +216,9 @@ private static ArrayList GetSearchResults(int portalId, string fieldName, string public static DataTableResponse ListOfRoles(List roles, int rolesTotal, double take, int pageIndex, int goToPageValue, string search, string orderBy, string order) { - if (!string.IsNullOrEmpty(search) && search != " ") + if (!string.IsNullOrEmpty(search) && search.Trim() != "") { - roles = roles.Where(e => string.Concat(e.RoleName.ToLower()).Contains(search.Trim().ToLower())).ToList(); + roles = roles.Where(e => e.RoleName.ToLower().Contains(search.Trim().ToLower())).ToList(); rolesTotal = roles.Count(); pageIndex = 0; } @@ -230,7 +230,7 @@ public static DataTableResponse ListOfRoles(List switch (orderBy) { case "RoleName": - roles = order == "desc" ? roles.OrderByDescending(x => x.RoleName).ToList() : roles.OrderBy(x => x.RoleName).ToList(); + roles = order == "desc" ? roles.OrderByDescending(x => x.RoleName.ToLower()).ToList() : roles.OrderBy(x => x.RoleName.ToLower()).ToList(); break; } } diff --git a/Modules/UserManager/Utility/UserRepository.cs b/Modules/UserManager/Utility/UserRepository.cs index 295ca1b..6d04d96 100644 --- a/Modules/UserManager/Utility/UserRepository.cs +++ b/Modules/UserManager/Utility/UserRepository.cs @@ -52,6 +52,7 @@ public class UserRepository /// Get all users by param /// /// + /// /// public static DataTableResponse GetUsers(Pagination pagination, int portalId) { @@ -66,10 +67,19 @@ public static DataTableResponse GetUsers(Pagination pagination, int porta { pagination.PageIndex = 0; } + var parameters = new + { + IsSuperUser = (int?)null, + Authorised = (int?)null, + AllUsers = 0, + Deleted = (int?)null, + PortalId = portalId + }; + switch (pagination.Filter) { case "Unauthorized": - var parameters = new + parameters = new { IsSuperUser = (int?)null, Authorised = (int?)0, @@ -77,7 +87,7 @@ public static DataTableResponse GetUsers(Pagination pagination, int porta Deleted = (int?)0, PortalId = portalId }; - return Functions.GetUsersProcedure(pagination, parameters); + break; case "Deleted": parameters = new @@ -88,7 +98,7 @@ public static DataTableResponse GetUsers(Pagination pagination, int porta Deleted = (int?)1, PortalId = portalId }; - return Functions.GetUsersProcedure(pagination, parameters); + break; case "SuperUsers": parameters = new @@ -99,7 +109,7 @@ public static DataTableResponse GetUsers(Pagination pagination, int porta Deleted = (int?)null, PortalId = portalId }; - return Functions.GetUsersProcedure(pagination, parameters); + break; case "All": parameters = new @@ -110,7 +120,7 @@ public static DataTableResponse GetUsers(Pagination pagination, int porta Deleted = (int?)null, PortalId = portalId }; - return Functions.GetUsersProcedure(pagination, parameters); + break; default: parameters = new @@ -121,8 +131,10 @@ public static DataTableResponse GetUsers(Pagination pagination, int porta Deleted = (int?)null, PortalId = portalId }; - return Functions.GetUsersProcedure(pagination, parameters); + break; } + + return Functions.GetUsersProcedure(pagination, parameters); } /// @@ -275,6 +287,7 @@ public static void EditUser(int portalId, UserViewModel user) userInfo.LastName = user.LastName; userInfo.Email = user.Email; userInfo.Username = user.Username; + userInfo.DisplayName = user.DisplayName; userInfo.PortalID = portalId; userInfo.IsSuperUser = currentUser.IsSuperUser ? user.IsSuperUser : false; userInfo.IsDeleted = currentUser.IsSuperUser ? user.IsDeleted : false; @@ -306,6 +319,8 @@ public static void DeleteUser(int portalId, int itemId) // Delete from aspnet_Users table DotNetNuke.Security.Membership.MembershipProvider membershipProvider = DotNetNuke.Security.Membership.MembershipProvider.Instance(); + user.Membership.Approved = false; + UserController.UpdateUser(portalId, user); membershipProvider.DeleteUser(user); } } diff --git a/Modules/UserManager/Views/RolesManage/Create.cshtml b/Modules/UserManager/Views/RolesManage/Create.cshtml index 0d90822..0ce3b06 100644 --- a/Modules/UserManager/Views/RolesManage/Create.cshtml +++ b/Modules/UserManager/Views/RolesManage/Create.cshtml @@ -6,7 +6,7 @@ @{ string ResourceFile = "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/AddEditRoles.resx"; } -
+
@if (!string.IsNullOrEmpty(ViewBag.ErrorMessage)) {
@@ -44,7 +44,7 @@ @Html.HiddenFor(m => m.RoleId)
- +
diff --git a/Modules/UserManager/Views/RolesManage/Edit.cshtml b/Modules/UserManager/Views/RolesManage/Edit.cshtml index 205db39..2ef8177 100644 --- a/Modules/UserManager/Views/RolesManage/Edit.cshtml +++ b/Modules/UserManager/Views/RolesManage/Edit.cshtml @@ -7,7 +7,7 @@ string ResourceFile = "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/AddEditRoles.resx"; } -
+
@if (!string.IsNullOrEmpty(ViewBag.ErrorMessage)) {
@@ -45,7 +45,7 @@ @Html.HiddenFor(m => m.RoleId)
- +
diff --git a/Modules/UserManager/Views/RolesManage/Index.cshtml b/Modules/UserManager/Views/RolesManage/Index.cshtml index 0c35b10..0ffe0a7 100644 --- a/Modules/UserManager/Views/RolesManage/Index.cshtml +++ b/Modules/UserManager/Views/RolesManage/Index.cshtml @@ -14,84 +14,75 @@ var pageView = @Model.GoToPage > 1 ? @Model.GoToPage : (pageIndexTo / @Model.Take) == 0 ? 1 : (pageIndexTo / @Model.Take); string ResourceFile = "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/Index.resx"; string SharedResourceFile = "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/Shared.resx"; + var itemsPerPage = Model.Take; + var totalItems = Model.RecordsTotal; + var pagesTotal = (int)Math.Ceiling((double)totalItems / itemsPerPage); } -
- -

@Localization.GetString("EditingSiteRoles", @SharedResourceFile)

-
- -
- -
- - - - @Html.TextBoxFor(m => m.Search, new { @class = "form-control", @type = "text", @style = " height: 40px;box-shadow: 0 0 3px 0 #888888" }) +
+
+
+
+
+
+ +
+ @Html.TextBoxFor(m => m.Search, new { @class = "form-control AM-search-input mt5", @type = "text" }) +
+
+
- - + @@ -127,23 +118,23 @@ @@ -153,29 +144,62 @@
@Localization.GetString("RoleName", @ResourceFile) - @Localization.GetString("Users", @ResourceFile) @Localization.GetString("Auto", @ResourceFile) @if (@item.AutoAssignment == true) { - + } else { - + } - - + - - + +
+ + + +
+ @RenderBody() +
+ + + \ No newline at end of file diff --git a/Modules/UserManager/Views/UserManage/ChangePassword.cshtml b/Modules/UserManager/Views/UserManage/ChangePassword.cshtml index 6692e45..bd591ce 100644 --- a/Modules/UserManager/Views/UserManage/ChangePassword.cshtml +++ b/Modules/UserManager/Views/UserManage/ChangePassword.cshtml @@ -14,7 +14,7 @@ @Dnn.LocalizeString("BasicSettings")
-
+
@Html.TextBoxFor(m => m.Password, new { @@ -25,7 +25,7 @@ })
-
+
@Html.TextBoxFor(m => m.ConfirmPassword, new { diff --git a/Modules/UserManager/Views/UserManage/Create.cshtml b/Modules/UserManager/Views/UserManage/Create.cshtml index 495e644..a1911a4 100644 --- a/Modules/UserManager/Views/UserManage/Create.cshtml +++ b/Modules/UserManager/Views/UserManage/Create.cshtml @@ -6,182 +6,203 @@ @using DotNetNuke.Security.Membership; @{ - string srcLogo = DotNetNuke.Entities.Tabs.TabController.CurrentPage.Title + - "/DesktopModules/MVC/Upendo.Modules.UserManager/Images/Upendo-logo-trans.png"; - string ResourceFile = "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/AddEdit.resx"; + string srcLogo = DotNetNuke.Entities.Tabs.TabController.CurrentPage.Title + + "/DesktopModules/MVC/Upendo.Modules.UserManager/Images/Upendo-logo-trans.png"; + string ResourceFile = "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/AddEdit.resx"; } -
-
-
-

@Localization.GetString("CreateUser", @ResourceFile)

+
+

@Localization.GetString("CreateUser", @ResourceFile)

+
+
+
+
+ + @Html.ValidationSummary(false, "", new { @class = "" }) +
+
+
+ @Html.TextBoxFor(m => m.FirstName) + @Html.ValidationMessageFor(m => m.FirstName) +
+
+
+ @Html.TextBoxFor(m => m.LastName) + @Html.ValidationMessageFor(m => m.LastName) +
+
+
+ @Html.TextBoxFor(m => m.Username) + @Html.ValidationMessageFor(m => m.Username) +
+
+
+ @Html.TextBoxFor(m => m.Email, new + { + @class = "form-control", + @type = "email", + id = "email", + onkeyup = + "validate();" + }) +
+ @Html.ValidationMessageFor(m => m.Email) +
+
+
+
+ @Html.TextBoxFor(m => m.Password, new + { + @class = "form-control", + @id = "password", + @type = "password", + onkeyup + = "handlePasswordValidation();" + }) + @Html.ValidationMessageFor(m => m.Password) + +
+
+
+ @Html.TextBoxFor(m => m.ConfirmPassword, new + { + @id = "confirm_password", + @type = "password", + onkeyup = + "validate();" + }) + +
+
+
+
+ @Html.CheckBoxFor(m => m.IsSuperUser, new { @id = "checkbox" }) + +
+
+ @Html.CheckBoxFor(m => m.Approved, new { @id = "checkbox" }) + +
+
+ @Html.CheckBoxFor(m => m.SendEmail, new { @id = "checkbox" }) + +
+
+
+
+ + + @Localization.GetString("Cancel", @ResourceFile) + +
+
+
-
-
-
-
- - @Html.ValidationSummary(false, "", new { @class = "" }) -
-
-
- @Html.TextBoxFor(m => m.FirstName) - @Html.ValidationMessageFor(m => m.FirstName) -
-
-
- @Html.TextBoxFor(m => m.LastName) - @Html.ValidationMessageFor(m => m.LastName) -
-
-
- @Html.TextBoxFor(m => m.Username) - @Html.ValidationMessageFor(m => m.Username) -
-
-
- @Html.TextBoxFor(m => m.Email, new { @class = "form-control", @type = "email", id = "email", onkeyup = "validate();" }) -
- @Html.ValidationMessageFor(m => m.Email) -
-
-
-
- @Html.TextBoxFor(m => m.Password, new { @class = "form-control", @id = "password", @type = "password", onkeyup = "handlePasswordValidation();" }) - @Html.ValidationMessageFor(m => m.Password) - -
-
-
- @Html.TextBoxFor(m => m.ConfirmPassword, new { @id = "confirm_password", @type = "password", onkeyup = "validate();" }) - -
-
-
-
- @Html.CheckBoxFor(m => m.IsSuperUser, new { @id = "checkbox" }) - -
-
- @Html.CheckBoxFor(m => m.Approved, new { @id = "checkbox" }) - -
-
- @Html.CheckBoxFor(m => m.SendEmail, new { @id = "checkbox" }) - -
-
-
-
-
- - - @Localization.GetString("Cancel", @ResourceFile) - -
-
\ No newline at end of file diff --git a/Modules/UserManager/Views/UserManage/Edit.cshtml b/Modules/UserManager/Views/UserManage/Edit.cshtml index 3d8d147..1cf8f9e 100644 --- a/Modules/UserManager/Views/UserManage/Edit.cshtml +++ b/Modules/UserManager/Views/UserManage/Edit.cshtml @@ -8,101 +8,122 @@ string defaultUserPicture = "/DesktopModules/MVC/Upendo.Modules.UserManager/Images/defaultUserPicture.jpg"; string ResourceFile = "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/AddEdit.resx"; } -
-
-

@Localization.GetString("AccountSettings", @ResourceFile)

- @if (!ViewData.ModelState.IsValid) - { -
- @Html.ValidationSummary(false, "", new { @class = "" }) -
- } -
-
-
- @Html.TextBoxFor(m => m.FirstName) - @Html.ValidationMessageFor(m => m.FirstName) -
-
-
- @Html.TextBoxFor(m => m.LastName) - @Html.ValidationMessageFor(m => m.LastName) -
-
-
- @Html.TextBoxFor(m => m.Username) - @Html.ValidationMessageFor(m => m.Username) -
-
-
- @Html.TextBoxFor(m => m.Email, new { @class = "form-control", @type = "email" }) - @Html.ValidationMessageFor(m => m.Email) -
-
-
- @Html.CheckBoxFor(m => m.IsSuperUser, new { @id = "chkIsSuperuser", @class = "superuser-checkbox" }) - -
-
- @Html.CheckBoxFor(m => m.Approved, new { @id = "chkApproved" }) - -
-
- @Html.CheckBoxFor(m => m.IsDeleted, new { @id = "chkIsDeleted" }) - -
-
- @Html.CheckBoxFor(m => m.SendEmail, new { @id = "chkSendEmail" }) - +
+
+
+
+

@Localization.GetString("AccountSettings", @ResourceFile)

+ @if (!ViewData.ModelState.IsValid) + { +
+ @Html.ValidationSummary(false, "", new { @class = "" }) +
+ } +
+
+
+ @Html.TextBoxFor(m => m.FirstName) + @Html.ValidationMessageFor(m => m.FirstName) +
+
+
+ @Html.TextBoxFor(m => m.LastName) + @Html.ValidationMessageFor(m => m.LastName) +
+
+
+ @Html.TextBoxFor(m => m.DisplayName) + @Html.ValidationMessageFor(m => m.DisplayName) +
+
+
+ @Html.TextBoxFor(m => m.Username) + @Html.ValidationMessageFor(m => m.Username) +
+
+
+ @Html.TextBoxFor(m => m.Email, new { @class = "form-control", @type = "email" }) + @Html.ValidationMessageFor(m => m.Email) +
+
+
+ @Html.CheckBoxFor(m => m.IsSuperUser, new + { + @id = "chkIsSuperuser", + @class = + "superuser-checkbox" + }) + +
+
+ @Html.CheckBoxFor(m => m.Approved, new { @id = "chkApproved" }) + +
+
+ @Html.CheckBoxFor(m => m.IsDeleted, new { @id = "chkIsDeleted" }) + +
+
+ @Html.CheckBoxFor(m => m.SendEmail, new { @id = "chkSendEmail" }) + +
+ @Html.HiddenFor(m => m.UserId) +
+
+ - @Html.HiddenFor(m => m.UserId)
-
- -
-
-
-

@Localization.GetString("AccountData", @ResourceFile)

-
-
- User +
+

@Localization.GetString("AccountData", @ResourceFile)

+
+
+ User +
+

@Localization.GetString("UserId", @ResourceFile) @Model.UserId

+

@Localization.GetString("DisplayName", @ResourceFile) @Model.DisplayName

+

@Localization.GetString("CreatedOnDate", @ResourceFile) @Model.CreatedOnDate

+

@Localization.GetString("LastModifiedOnDate", @ResourceFile) @Model.LastModifiedOnDate

+

@Localization.GetString("UpdatePassword", @ResourceFile) @Model.UpdatePassword

+

@Localization.GetString("UserRoles", @ResourceFile)

+
    + @{ + foreach (var item in Model.UserRoles) + { +
  • @item
  • + } + } +
+
-

@Localization.GetString("UserId", @ResourceFile) @Model.UserId

-

@Localization.GetString("DisplayName", @ResourceFile) @Model.DisplayName

-

@Localization.GetString("CreatedOnDate", @ResourceFile) @Model.CreatedOnDate

-

@Localization.GetString("LastModifiedOnDate", @ResourceFile) @Model.LastModifiedOnDate

-

@Localization.GetString("UpdatePassword", @ResourceFile) @Model.UpdatePassword

-

@Localization.GetString("UserRoles", @ResourceFile)

-
    - @{ - foreach (var item in Model.UserRoles) - { -
  • @item
  • - } - } -
-
-
-
-
-
- - +
+
+ + +
+ \ No newline at end of file diff --git a/Modules/UserManager/Views/UserManage/Index.cshtml b/Modules/UserManager/Views/UserManage/Index.cshtml index 0ed5484..fca2687 100644 --- a/Modules/UserManager/Views/UserManage/Index.cshtml +++ b/Modules/UserManager/Views/UserManage/Index.cshtml @@ -17,160 +17,128 @@ var pageView = PageIndex; var pageIndexTo = (pageIndexPaginate + Model.Take) - 1; var skipTo = Model.PageIndex + Model.Take; + var itemsPerPage = Model.Take; + var totalItems = Model.RecordsTotal; + var pagesTotal = (int)Math.Ceiling((double)totalItems / itemsPerPage); } -
-
- +
- + @@ -185,8 +153,8 @@ @@ -216,27 +184,26 @@ @@ -246,17 +213,21 @@
@Localization.GetString("Username", @ResourceFile) @Localization.GetString("DisplayName", @ResourceFile)
-

@Localization.GetString("NoUsersFound", @ResourceFile)

-

@Localization.GetString("SearchCriteria", @ResourceFile)

+
@Localization.GetString("NoUsersFound", @ResourceFile)
+
@Localization.GetString("SearchCriteria", @ResourceFile)
@if (@item.IsSuperUser == true) { - + } else { - - + } - - + - - + - - + +
@@ -275,9 +246,9 @@ $(function () { yesText: "Delete", noText: "Cancel", dialogClass: 'dnnFormPopup', - text: '

' + deleteText + '

' + text: '

' + deleteText + '

', + }); }); -}); $(function () { $('#dialogs-DeleteUnauthorized .confirm').dnnConfirm({ diff --git a/Modules/UserManager/Views/UserManage/UserRoles.cshtml b/Modules/UserManager/Views/UserManage/UserRoles.cshtml index 4ac6c8d..df1390a 100644 --- a/Modules/UserManager/Views/UserManage/UserRoles.cshtml +++ b/Modules/UserManager/Views/UserManage/UserRoles.cshtml @@ -17,75 +17,62 @@ var pageView = @Model.GoToPage > 1 ? @Model.GoToPage : (pageIndexTo / @Model.Take) == 0 ? 1 : (pageIndexTo / @Model.Take); string ResourceFile = "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/UserRoles.resx"; string SharedResourceFile = "~/DesktopModules/MVC/Upendo.Modules.UserManager/App_LocalResources/Shared.resx"; - + var itemsPerPage = Model.Take; + var totalItems = Model.RecordsTotal; + var pagesTotal = (int)Math.Ceiling((double)totalItems / itemsPerPage); } -
- -

@Localization.GetString("RoleList", @ResourceFile) @name (@userId)

- -
-
- -
- - - - @Html.TextBoxFor(m => m.Search, new { @class = "form-control", @type = "text", @style = " height: 40px;box-shadow: 0 0 3px 0 #888888" }) +
+
+
+
+
+
+ +
+ @Html.TextBoxFor(m => m.Search, new { @class = "form-control AM-search-input mt5", @type = "text" }) +
+
+
- - - + + - + @@ -105,7 +92,7 @@ foreach (var item in Model.Data) { - - @@ -181,28 +168,40 @@ - - - + + \ No newline at end of file + diff --git a/Modules/UserManager/releasenotes.txt b/Modules/UserManager/releasenotes.txt index 60b6c89..8e5e507 100644 --- a/Modules/UserManager/releasenotes.txt +++ b/Modules/UserManager/releasenotes.txt @@ -34,6 +34,28 @@
  • SI: Support Inquiry - This issue was reported by a support customer and, as such, was prioritized above all other tasks.
  • +

    Release Notes: 01.03.00

    + +

    Enhancements

    +
      +
    • None at this time.
    • + +
    + +

    Maintenance Updates

    + +
    +

    Release Notes: 01.02.00

    Enhancements

    @Localization.GetString("Role", @ResourceFile) @Localization.GetString("Start", @ResourceFile) @Localization.GetString("Expires", @ResourceFile)@Localization.GetString("Actions", @ResourceFile)@Localization.GetString("Actions", @ResourceFile)
    @item.Index @@ -121,41 +108,41 @@ @(item.ExpiryDate.HasValue && item.ExpiryDate.Value != DateTime.MinValue ? item.ExpiryDate.Value.ToString("yyyy-MM-dd") : "")

    - + +
    - - - + + +
    - +
    - - - + + +
    - - - + + + @if (@item.HasRole == true) { - - + } else { - - + }