Update FormsElementDriver.cs

This commit is contained in:
jtkech
2016-03-19 03:41:24 +01:00
parent 740039d6ef
commit 0df2f3ab57

View File

@@ -78,6 +78,12 @@ namespace Orchard.Layouts.Framework.Drivers {
if (value != null) { if (value != null) {
context.Element.Data[name] = value.AttemptedValue; context.Element.Data[name] = value.AttemptedValue;
} }
else if (formElementShape.Metadata.Type == "Checkbox") {
var shapeValue = formElementShape.Value as string;
if (shapeValue != null && shapeValue.ToLower() == "true") {
context.Element.Data[name] = "false";
}
}
} }
} }
@@ -87,4 +93,4 @@ namespace Orchard.Layouts.Framework.Drivers {
protected virtual void DescribeForm(DescribeContext context) { } protected virtual void DescribeForm(DescribeContext context) { }
} }
} }