mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-20 19:03:25 +08:00
Update FormsElementDriver.cs
This commit is contained in:
@@ -78,6 +78,12 @@ namespace Orchard.Layouts.Framework.Drivers {
|
||||
if (value != null) {
|
||||
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) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user