diff --git a/src/OrchardCore.Modules/OrchardCore.ContentFields/Media/MediaShapes.cs b/src/OrchardCore.Modules/OrchardCore.ContentFields/Media/MediaShapes.cs index 962097f31ef..64e362deb59 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentFields/Media/MediaShapes.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentFields/Media/MediaShapes.cs @@ -1,18 +1,18 @@ -using OrchardCore.DisplayManagement; +using System.Threading.Tasks; using OrchardCore.DisplayManagement.Descriptors; using OrchardCore.Modules; namespace OrchardCore.ContentFields.Media { [RequireFeatures("OrchardCore.Media")] - public class MediaShapes : IShapeTableProvider + public class MediaShapes : ShapeTableProvider { - public void Discover(ShapeTableBuilder builder) + public override ValueTask DiscoverAsync(ShapeTableBuilder builder) { builder.Describe("HtmlField_Edit") .OnDisplaying(displaying => { - IShape editor = displaying.Shape; + var editor = displaying.Shape; if (editor.Metadata.Type == "HtmlField_Edit__Wysiwyg") { @@ -24,6 +24,8 @@ public void Discover(ShapeTableBuilder builder) editor.Metadata.Wrappers.Add("Media_Wrapper__HtmlField"); } }); + + return ValueTask.CompletedTask; } } } diff --git a/src/OrchardCore.Modules/OrchardCore.ContentFields/Views/YoutubeFieldSetting.Edit.cshtml b/src/OrchardCore.Modules/OrchardCore.ContentFields/Views/YoutubeFieldSetting.Edit.cshtml index 1316d842a23..ab9f44f60ad 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentFields/Views/YoutubeFieldSetting.Edit.cshtml +++ b/src/OrchardCore.Modules/OrchardCore.ContentFields/Views/YoutubeFieldSetting.Edit.cshtml @@ -1,11 +1,5 @@ -@model OrchardCore.ContentFields.Settings.YoutubeFieldSettings -@using OrchardCore.ContentFields.Settings +@model YoutubeFieldSettings -@inject OrchardCore.DisplayManagement.Theming.IThemeManager ThemeManager -@inject OrchardCore.DisplayManagement.Descriptors.IShapeTableManager ShapeTableManager -@{ - -}