-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added checks to properly display CustomForm content items at front end (
#8751) * Display CustomForm_Wrapper shape only if shape type is Detail. Publish button has to be visible only if content is draftable AND is set to show the publish button # Conflicts: # src/Orchard.Web/Modules/Orchard.CustomForms/Drivers/CustomFormPartDriver.cs # src/Orchard.Web/Modules/Orchard.CustomForms/Views/Item/Create.cshtml # src/Orchard.Web/Modules/Orchard.CustomForms/Views/Parts.CustomForm.Wrapper.cshtml * Added EditorBuilderWrapper.
- Loading branch information
1 parent
4043df7
commit 417af34
Showing
6 changed files
with
135 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/Orchard.Web/Modules/Orchard.CustomForms/Services/EditorBuilderWrapper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Orchard.ContentManagement; | ||
|
||
namespace Orchard.CustomForms.Services { | ||
public class EditorBuilderWrapper : IEditorBuilderWrapper { | ||
|
||
private readonly IContentManager _contentManager; | ||
|
||
public EditorBuilderWrapper( | ||
IContentManager contentManager) { | ||
|
||
_contentManager = contentManager; | ||
} | ||
|
||
public dynamic BuildEditor(IContent content) { | ||
return _contentManager.BuildEditor(content); | ||
} | ||
|
||
public dynamic UpdateEditor(IContent content, IUpdateModel updateModel) { | ||
return _contentManager.UpdateEditor(content, updateModel); | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/Orchard.Web/Modules/Orchard.CustomForms/Services/IEditorBuilderWrapper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using Orchard.ContentManagement; | ||
|
||
namespace Orchard.CustomForms.Services { | ||
public interface IEditorBuilderWrapper : IDependency { | ||
dynamic BuildEditor(IContent content); | ||
dynamic UpdateEditor(IContent content, IUpdateModel updateModel); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters