Skip to content

Commit

Permalink
Adds the prefix to the display manager. Fixes #11612 (#11775)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Aug 18, 2022
1 parent 0905e31 commit b418890
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ public Task<IShape> BuildDisplayAsync(IActivity model, IUpdateModel updater, str
return _displayManager.BuildDisplayAsync(model, updater, displayType, groupId);
}

public Task<IShape> BuildEditorAsync(IActivity model, IUpdateModel updater, bool isNew, string groupId = "")
public Task<IShape> BuildEditorAsync(IActivity model, IUpdateModel updater, bool isNew, string groupId = "", string htmlPrefix = "")
{
return _displayManager.BuildEditorAsync(model, updater, isNew, groupId);
return _displayManager.BuildEditorAsync(model, updater, isNew, groupId, htmlPrefix);
}

public Task<IShape> UpdateEditorAsync(IActivity model, IUpdateModel updater, bool isNew, string groupId = "")
public Task<IShape> UpdateEditorAsync(IActivity model, IUpdateModel updater, bool isNew, string groupId = "", string htmlPrefix = "")
{
return _displayManager.UpdateEditorAsync(model, updater, isNew, groupId);
return _displayManager.UpdateEditorAsync(model, updater, isNew, groupId, htmlPrefix);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ await _drivers.InvokeAsync(async (driver, model, context) =>
return shape;
}

public async Task<IShape> BuildEditorAsync(TModel model, IUpdateModel updater, bool isNew, string group = null)
public async Task<IShape> BuildEditorAsync(TModel model, IUpdateModel updater, bool isNew, string group = null, string htmlPrefix = "")
{
var actualShapeType = typeof(TModel).Name + "_Edit";

Expand All @@ -84,7 +84,7 @@ public async Task<IShape> BuildEditorAsync(TModel model, IUpdateModel updater, b
shape,
group ?? "",
isNew,
"",
htmlPrefix,
_shapeFactory,
await _layoutAccessor.GetLayoutAsync(),
new ModelStateWrapperUpdater(updater)
Expand All @@ -104,7 +104,7 @@ await _drivers.InvokeAsync(async (driver, model, context) =>
return shape;
}

public async Task<IShape> UpdateEditorAsync(TModel model, IUpdateModel updater, bool isNew, string group = null)
public async Task<IShape> UpdateEditorAsync(TModel model, IUpdateModel updater, bool isNew, string group = null, string htmlPrefix = "")
{
var actualShapeType = typeof(TModel).Name + "_Edit";

Expand All @@ -118,7 +118,7 @@ public async Task<IShape> UpdateEditorAsync(TModel model, IUpdateModel updater,
shape,
group ?? "",
isNew,
"",
htmlPrefix,
_shapeFactory,
await _layoutAccessor.GetLayoutAsync(),
new ModelStateWrapperUpdater(updater)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace OrchardCore.DisplayManagement
public interface IDisplayManager<TModel>
{
Task<IShape> BuildDisplayAsync(TModel model, IUpdateModel updater, string displayType = "", string groupId = "");
Task<IShape> BuildEditorAsync(TModel model, IUpdateModel updater, bool isNew, string groupId = "");
Task<IShape> UpdateEditorAsync(TModel model, IUpdateModel updater, bool isNew, string groupId = "");
Task<IShape> BuildEditorAsync(TModel model, IUpdateModel updater, bool isNew, string groupId = "", string htmlPrefix = "");
Task<IShape> UpdateEditorAsync(TModel model, IUpdateModel updater, bool isNew, string groupId = "", string htmlPrefix = "");
}
}

0 comments on commit b418890

Please sign in to comment.