mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Added NumericFieldBinding.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.DynamicForms.Services;
|
||||
using Orchard.DynamicForms.Services.Models;
|
||||
using Orchard.Fields.Fields;
|
||||
|
||||
namespace Orchard.DynamicForms.Bindings {
|
||||
public class NumericFieldBindings : Component, IBindingProvider {
|
||||
public void Describe(BindingDescribeContext context) {
|
||||
context.For<NumericField>()
|
||||
.Binding("Value", (contentItem, field, s) => field.Value = XmlHelper.Parse<decimal>(s));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -166,6 +166,7 @@
|
||||
<Compile Include="Bindings\EnumerationFieldBindings.cs" />
|
||||
<Compile Include="Bindings\InputFieldBindings.cs" />
|
||||
<Compile Include="Bindings\TaxonomyFieldBindings.cs" />
|
||||
<Compile Include="Bindings\NumericFieldBindings.cs" />
|
||||
<Compile Include="Forms\AddModelErrorForm.cs" />
|
||||
<Compile Include="Forms\SelectDynamicForms.cs" />
|
||||
<Compile Include="Bindings\TextFieldBindings.cs" />
|
||||
|
||||
Reference in New Issue
Block a user