Files
Umbraco-CMS/src/Umbraco.Web/PropertyEditors/IntegerConfigurationEditor.cs
2018-11-22 14:05:51 +00:00

38 lines
1.2 KiB
C#

using Umbraco.Core.PropertyEditors;
using Umbraco.Core.PropertyEditors.Validators;
namespace Umbraco.Web.PropertyEditors
{
/// <summary>
/// A custom pre-value editor class to deal with the legacy way that the pre-value data is stored.
/// </summary>
internal class IntegerConfigurationEditor : ConfigurationEditor
{
public IntegerConfigurationEditor()
{
Fields.Add(new ConfigurationField(new IntegerValidator())
{
Description = "Enter the minimum amount of number to be entered",
Key = "min",
View = "number",
Name = "Minimum"
});
Fields.Add(new ConfigurationField(new IntegerValidator())
{
Description = "Enter the intervals amount between each step of number to be entered",
Key = "step",
View = "number",
Name = "Step Size"
});
Fields.Add(new ConfigurationField(new IntegerValidator())
{
Description = "Enter the maximum amount of number to be entered",
Key = "max",
View = "number",
Name = "Maximum"
});
}
}
}