mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
@@ -27,13 +27,13 @@ namespace Orchard.CustomForms.Activities {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var content = workflowContext.Content;
|
var content = workflowContext.Tokens["CustomForm"] as ContentItem;
|
||||||
|
|
||||||
if (content == null) {
|
if (content == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var contentManager = content.ContentItem.ContentManager;
|
var contentManager = content.ContentManager;
|
||||||
var identities = state.Split(',').Select(x => new ContentIdentity(x));
|
var identities = state.Split(',').Select(x => new ContentIdentity(x));
|
||||||
var customForms = identities.Select(contentManager.ResolveIdentity);
|
var customForms = identities.Select(contentManager.ResolveIdentity);
|
||||||
|
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ namespace Orchard.CustomForms.Controllers {
|
|||||||
|
|
||||||
// trigger any workflow
|
// trigger any workflow
|
||||||
_workflowManager.TriggerEvent(FormSubmittedActivity.EventName, contentItem,
|
_workflowManager.TriggerEvent(FormSubmittedActivity.EventName, contentItem,
|
||||||
() => new Dictionary<string, object> { { "Content", contentItem } });
|
() => new Dictionary<string, object> { { "Content", contentItem} , { "CustomForm", customForm.ContentItem } });
|
||||||
|
|
||||||
if (customForm.Redirect) {
|
if (customForm.Redirect) {
|
||||||
returnUrl = _tokenizer.Replace(customForm.RedirectUrl, new Dictionary<string, object> { { "Content", contentItem } });
|
returnUrl = _tokenizer.Replace(customForm.RedirectUrl, new Dictionary<string, object> { { "Content", contentItem } });
|
||||||
|
|||||||
Reference in New Issue
Block a user