mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-21 03:14:10 +08:00
Update FormsElementDriver.cs
This commit is contained in:
@@ -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) { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user