Expose Mandatory setting in ContentProperty

This allows a PropertyEditor to be aware of whether it's required or not, via: `$scope.model.mandatory` (along with `$scope.model.alias`, etc)
This commit is contained in:
Tom Fulton
2014-03-13 23:32:12 -06:00
parent 06a08be6de
commit 1ec2901762
2 changed files with 4 additions and 0 deletions

View File

@@ -31,5 +31,8 @@ namespace Umbraco.Web.Models.ContentEditing
[DataMember(Name = "hideLabel")]
public bool HideLabel { get; set; }
[DataMember(Name = "mandatory")]
public bool Mandatory { get; set; }
}
}

View File

@@ -35,6 +35,7 @@ namespace Umbraco.Web.Models.Mapping
display.Description = originalProp.PropertyType.Description;
display.Label = originalProp.PropertyType.Name;
display.HideLabel = valEditor.HideLabel;
display.Mandatory = originalProp.PropertyType.Mandatory;
if (display.PropertyEditor == null)
{