#20241, #20191: Fixing Decision Script

- Boolean field what incorrectly updating values for drafts
- Decision script is now using #{ } token syntax by default
- ContentItem is used by custom forms

Work Items: 20241, 20191
This commit is contained in:
Sebastien Ros
2014-03-21 17:57:18 -07:00
parent eaa9ae1682
commit 24f9225361
3 changed files with 6 additions and 2 deletions

View File

@@ -155,7 +155,7 @@ namespace Orchard.CustomForms.Controllers {
() => new Dictionary<string, object> { { "Content", contentItem } });
// trigger any workflow
_workflowManager.TriggerEvent(FormSubmittedActivity.EventName, customForm.ContentItem,
_workflowManager.TriggerEvent(FormSubmittedActivity.EventName, contentItem,
() => new Dictionary<string, object> { { "Content", contentItem } });
if (customForm.Redirect) {

View File

@@ -52,7 +52,8 @@ namespace Orchard.Fields.Drivers {
}
}
return Editor(part, field, shapeHelper);
return ContentShape("Fields_Boolean_Edit", GetDifferentiator(field, part),
() => shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: field, Prefix: GetPrefix(field, part)));
}
protected override void Importing(ContentPart part, BooleanField field, ImportContentContext context) {

View File

@@ -46,6 +46,9 @@ namespace Orchard.Scripting.CSharp.Activities {
public override IEnumerable<LocalizedString> Execute(WorkflowContext workflowContext, ActivityContext activityContext) {
var script = activityContext.GetState<string>("Script");
script = "// #{ }" + System.Environment.NewLine;
object outcome = null;
_csharpService.SetParameter("Services", _orchardServices);