Fixes: U4-3644 Multiple Textstring DataType not displaying in DocType (vs. 7.0.0 build 183)

This commit is contained in:
Shannon
2013-11-25 17:36:56 +11:00
parent e1ef2e8700
commit 9a856df8bc
2 changed files with 12 additions and 5 deletions

View File

@@ -44,7 +44,7 @@ namespace Umbraco.Web.PropertyEditors
});
Fields.Add(new PreValueField(new IntegerValidator())
{
Description = "Enter the maximum amount of text boxes to be displayed, enter -1 for unlimited",
Description = "Enter the maximum amount of text boxes to be displayed, enter 0 for unlimited",
Key = "max",
View = "requiredfield",
Name = "Maximum"
@@ -153,8 +153,13 @@ namespace Umbraco.Web.PropertyEditors
.Where(x => x["value"] != null)
.Select(x => x["value"].Value<string>());
//only allow the max
return string.Join(Environment.NewLine, array.Take(max));
//only allow the max if over 0
if (max > 0)
{
return string.Join(Environment.NewLine, array.Take(max));
}
return string.Join(Environment.NewLine, array);
}
/// <summary>