mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#18867: Rendering CustomForm title
Work Item: 18867 --HG-- branch : 1.x
This commit is contained in:
@@ -67,7 +67,7 @@ namespace Orchard.CustomForms.Controllers {
|
||||
dynamic model = _contentManager.BuildEditor(contentItem);
|
||||
|
||||
model
|
||||
.ContenItem(form)
|
||||
.ContentItem(form)
|
||||
.ReturnUrl(Url.RouteUrl(_contentManager.GetItemMetadata(form).DisplayRouteValues));
|
||||
|
||||
// Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
|
||||
|
@@ -2,11 +2,14 @@
|
||||
@{
|
||||
ContentItem customForm = Model.ContentItem;
|
||||
string returnUrl = Model.ReturnUrl;
|
||||
|
||||
var titlePart = customForm.As<Orchard.Core.Title.Models.TitlePart>();
|
||||
|
||||
// remove default Save/Publish buttons
|
||||
Model.Zones["Sidebar"].Items.Clear();
|
||||
}
|
||||
|
||||
@Display(New.Parts_Title().ContentPart(titlePart).Title(titlePart.Title))
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost(returnUrl)) {
|
||||
@Html.ValidationSummary()
|
||||
// Model is a Shape, calling Display() so that it is rendered using the most specific template for its Shape type
|
||||
|
Reference in New Issue
Block a user