diff --git a/OrchardCore.sln b/OrchardCore.sln index 1d341fab5e2..a01c9492069 100644 --- a/OrchardCore.sln +++ b/OrchardCore.sln @@ -383,6 +383,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Tests.Functiona EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Placements", "src\OrchardCore.Modules\OrchardCore.Placements\OrchardCore.Placements.csproj", "{5F94223B-CD69-47E1-B4AE-DEA03CBC4D3D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Configuration.KeyVault", "src\OrchardCore\OrchardCore.Configuration.KeyVault\OrchardCore.Configuration.KeyVault.csproj", "{17187E9E-90EE-4484-AC5E-8920D9126025}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1037,6 +1039,10 @@ Global {5F94223B-CD69-47E1-B4AE-DEA03CBC4D3D}.Debug|Any CPU.Build.0 = Debug|Any CPU {5F94223B-CD69-47E1-B4AE-DEA03CBC4D3D}.Release|Any CPU.ActiveCfg = Release|Any CPU {5F94223B-CD69-47E1-B4AE-DEA03CBC4D3D}.Release|Any CPU.Build.0 = Release|Any CPU + {17187E9E-90EE-4484-AC5E-8920D9126025}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17187E9E-90EE-4484-AC5E-8920D9126025}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17187E9E-90EE-4484-AC5E-8920D9126025}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17187E9E-90EE-4484-AC5E-8920D9126025}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1218,6 +1224,7 @@ Global {57EA05E8-0275-4163-8FD1-2B244E396F91} = {F23AC6C2-DE44-4699-999D-3C478EF3D691} {2CA507BD-5517-4CD2-8F30-093AC5D11EBA} = {B8D16C60-99B4-43D5-A3AD-4CD89AF39B25} {5F94223B-CD69-47E1-B4AE-DEA03CBC4D3D} = {90030E85-0C4F-456F-B879-443E8A3F220D} + {17187E9E-90EE-4484-AC5E-8920D9126025} = {F23AC6C2-DE44-4699-999D-3C478EF3D691} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46A1D25A-78D1-4476-9CBF-25B75E296341} diff --git a/mkdocs.yml b/mkdocs.yml index 97de0ddd418..6ac74e8e07f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -170,6 +170,7 @@ nav: - GraphQL queries: docs/reference/core/Apis.GraphQL.Abstractions/README.md - Health Check: docs/reference/modules/HealthChecks/README.md - HTTPS: docs/reference/modules/Https/README.md + - Key Vault (Azure): docs/reference/core/KeyVault.Azure/README.md - Localization: docs/reference/modules/Localize/README.md - Logging Serilog: docs/reference/core/Logging.Serilog/readme.md - Mini Profiler: docs/reference/modules/MiniProfiler/README.md diff --git a/src/OrchardCore.Build/Dependencies.props b/src/OrchardCore.Build/Dependencies.props index c5fe7b7983e..a6eb675c3c6 100644 --- a/src/OrchardCore.Build/Dependencies.props +++ b/src/OrchardCore.Build/Dependencies.props @@ -9,7 +9,9 @@ + + @@ -38,9 +40,8 @@ - - - + + diff --git a/src/OrchardCore.Cms.Web/appsettings.json b/src/OrchardCore.Cms.Web/appsettings.json index ac619176b27..01ac0cee8ba 100644 --- a/src/OrchardCore.Cms.Web/appsettings.json +++ b/src/OrchardCore.Cms.Web/appsettings.json @@ -68,6 +68,11 @@ // "TablePrefix": "", // Optionally, configure a table prefix. // "MigrateFromFiles": true // Optionally, enable to migrate existing App_Data files to Database automatically. //}, + // Add 'AddOrchardCoreAzureKeyVault()' to the Generic Host in 'CreateHostBuilder() section'. + // "OrchardCore_KeyVault_Azure": { + // "KeyVaultName": "", // Set the name of your Azure Key Vault. + // "ReloadInterval": // Optional, timespan to wait between attempts at polling the Azure KeyVault for changes. Leave blank to disable reloading. + // }, // See https://docs.orchardcore.net/en/latest/docs/reference/modules/Users/Configuration/#custom-paths //"OrchardCore_Users": { // "LoginPath": "Login", diff --git a/src/OrchardCore.Modules/OrchardCore.ContentLocalization/Handlers/LocalizationPartHandler.cs b/src/OrchardCore.Modules/OrchardCore.ContentLocalization/Handlers/LocalizationPartHandler.cs index e51d54053fe..76d08b09da4 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentLocalization/Handlers/LocalizationPartHandler.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentLocalization/Handlers/LocalizationPartHandler.cs @@ -24,6 +24,7 @@ public override Task GetContentItemAspectAsync(ContentItemAspectContext context, if (part.Culture != null) { cultureAspect.Culture = CultureInfo.GetCultureInfo(part.Culture); + cultureAspect.HasCulture = true; } return Task.CompletedTask; diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Views/ContentsAdminList-Create.cshtml b/src/OrchardCore.Modules/OrchardCore.Contents/Views/ContentsAdminList-Create.cshtml index 89cada0d493..362a76f3309 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Views/ContentsAdminList-Create.cshtml +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Views/ContentsAdminList-Create.cshtml @@ -13,7 +13,7 @@ -
    -
  • -
    -
    -
    - - - - + @if (Model.ShapePlacements.Any()) + { +
  • +
    +
    +
    + + + + +
    -
    - - -
  • - @if (Model.ShapePlacements.Any()) - { + @foreach (var entry in Model.ShapePlacements) {
  • diff --git a/src/OrchardCore.Modules/OrchardCore.Templates/Views/Template/Index.cshtml b/src/OrchardCore.Modules/OrchardCore.Templates/Views/Template/Index.cshtml index f0b201337a8..31befc5ad46 100644 --- a/src/OrchardCore.Modules/OrchardCore.Templates/Views/Template/Index.cshtml +++ b/src/OrchardCore.Modules/OrchardCore.Templates/Views/Template/Index.cshtml @@ -2,6 +2,7 @@ @{ int startIndex = (Model.Pager.Page - 1) * (Model.Pager.PageSize) + 1; int endIndex = startIndex + Model.Templates.Count - 1; + var formAction = Model.Options.AdminTemplates ? "admin" : "index"; } @if (Model.Options.AdminTemplates) @@ -14,7 +15,7 @@ else } @* the form is necessary to generate and antiforgery token for the delete action *@ -
    + diff --git a/src/OrchardCore.Modules/OrchardCore.Users/Controllers/AccountController.cs b/src/OrchardCore.Modules/OrchardCore.Users/Controllers/AccountController.cs index 4d75c2ff29e..daa68fdc11a 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/Controllers/AccountController.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/Controllers/AccountController.cs @@ -103,6 +103,10 @@ public async Task Login(string returnUrl = null) } } + foreach (var errorMessage in TempData.Where(x => x.Key.StartsWith("error")).Select(x => x.Value.ToString())) + { + ModelState.AddModelError(string.Empty, errorMessage); + } ViewData["ReturnUrl"] = returnUrl; return View(); } @@ -211,7 +215,10 @@ public async Task Login(LoginViewModel model, string returnUrl = } } } - ModelState.AddModelError(string.Empty, S["Invalid login attempt."]); + else + { + ModelState.AddModelError(string.Empty, S["Invalid login attempt."]); + } await _accountEvents.InvokeAsync((e, model) => e.LoggingInFailedAsync(model.UserName), model, _logger); } } @@ -374,14 +381,16 @@ public async Task ExternalLoginCallback(string returnUrl = null, if (remoteError != null) { _logger.LogError("Error from external provider: {Error}", remoteError); - return RedirectToAction(nameof(Login)); + ModelState.AddModelError("", S["An error occurred in external provider."]); + return RedirectToLogin(returnUrl); } var info = await _signInManager.GetExternalLoginInfoAsync(); if (info == null) { _logger.LogError("Could not get external login info."); - return RedirectToAction(nameof(Login)); + ModelState.AddModelError("", S["An error occurred in external provider."]); + return RedirectToLogin(returnUrl); } var registrationSettings = (await _siteService.GetSiteSettingsAsync()).As(); @@ -389,7 +398,7 @@ public async Task ExternalLoginCallback(string returnUrl = null, if (user != null) { - if (!await AddConfirmEmailError(user)) + if (!await AddConfirmEmailError(user) && !AddUserEnabledError(user)) { await _accountEvents.InvokeAsync((e, user, modelState) => e.LoggingInAsync(user.UserName, (key, message) => modelState.AddModelError(key, message)), user, ModelState, _logger); @@ -420,7 +429,7 @@ public async Task ExternalLoginCallback(string returnUrl = null, ViewData["UserName"] = user.UserName; ViewData["Email"] = email; - return View("LinkExternalLogin"); + return View(nameof(LinkExternalLogin)); } else { @@ -477,7 +486,7 @@ public async Task ExternalLoginCallback(string returnUrl = null, else { ModelState.AddModelError(string.Empty, S["Invalid login attempt."]); - return View(nameof(Login)); + return RedirectToLogin(returnUrl); } } AddIdentityErrors(identityResult); @@ -487,7 +496,21 @@ public async Task ExternalLoginCallback(string returnUrl = null, } } } - return RedirectToAction(nameof(Login)); + return RedirectToLogin(returnUrl); + } + + private RedirectToActionResult RedirectToLogin(string returnUrl) + { + var iix = 0; + foreach (var state in ModelState.Where(x => x.Key == string.Empty)) + { + foreach (var item in state.Value.Errors) + { + iix++; + TempData[$"error_{iix}"] = item.ErrorMessage; + } + } + return RedirectToAction(nameof(Login), new { returnUrl }); } [HttpPost] diff --git a/src/OrchardCore.Themes/TheAdmin/Assets/scss/modules/theme/darkmode/_bootswatch.scss b/src/OrchardCore.Themes/TheAdmin/Assets/scss/modules/theme/darkmode/_bootswatch.scss index 78d13f69610..06e0e59716d 100644 --- a/src/OrchardCore.Themes/TheAdmin/Assets/scss/modules/theme/darkmode/_bootswatch.scss +++ b/src/OrchardCore.Themes/TheAdmin/Assets/scss/modules/theme/darkmode/_bootswatch.scss @@ -39,6 +39,7 @@ #mediaApp { background-color: $body-bg; } + // Buttons ===================================================================== // Typography ================================================================== @@ -49,6 +50,10 @@ } } +.trumbowyg-fullscreen .trumbowyg-editor{ + color: black; +} + // Tables ====================================================================== .table { diff --git a/src/OrchardCore.Themes/TheAdmin/Views/Layout.cshtml b/src/OrchardCore.Themes/TheAdmin/Views/Layout.cshtml index 081a9267ff3..aed176e70ea 100644 --- a/src/OrchardCore.Themes/TheAdmin/Views/Layout.cshtml +++ b/src/OrchardCore.Themes/TheAdmin/Views/Layout.cshtml @@ -32,7 +32,7 @@