Fixes: U4-3644 Multiple Textstring DataType not displaying in DocType (vs. 7.0.0 build 183)
This commit is contained in:
@@ -5,13 +5,15 @@
|
||||
<a prevent-default href="" title="Remove this text box"
|
||||
ng-show="model.value.length > model.config.min"
|
||||
ng-click="remove($index)">
|
||||
<i class="icon icon-minus"></i>
|
||||
<i class="icon icon-remove"></i>
|
||||
</a>
|
||||
</div>
|
||||
<a prevent-default href="" title="Add another text box"
|
||||
ng-show="model.config.max <= 0 || model.value.length < model.config.max"
|
||||
ng-click="add()">
|
||||
<i class="icon icon-plus"></i>
|
||||
<i class="icon icon-add"></i>
|
||||
</a>
|
||||
|
||||
{{model | json}}
|
||||
|
||||
</div>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user