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:
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user