get and set AllowSegmentVariant
This commit is contained in:
@@ -83,7 +83,7 @@
|
||||
});
|
||||
|
||||
var saveProperties = _.map(realProperties, function (p) {
|
||||
var saveProperty = _.pick(p, 'id', 'alias', 'description', 'validation', 'label', 'sortOrder', 'dataTypeId', 'groupId', 'memberCanEdit', 'showOnMemberProfile', 'isSensitiveData', 'allowCultureVariant');
|
||||
var saveProperty = _.pick(p, 'id', 'alias', 'description', 'validation', 'label', 'sortOrder', 'dataTypeId', 'groupId', 'memberCanEdit', 'showOnMemberProfile', 'isSensitiveData', 'allowCultureVariant', 'allowSegmentVariant');
|
||||
return saveProperty;
|
||||
});
|
||||
|
||||
|
||||
@@ -228,6 +228,7 @@ namespace Umbraco.Web.Models.Mapping
|
||||
target.ValidationRegExp = source.Validation.Pattern;
|
||||
target.ValidationRegExpMessage = source.Validation.PatternMessage;
|
||||
target.SetVariesBy(ContentVariation.Culture, source.AllowCultureVariant);
|
||||
target.SetVariesBy(ContentVariation.Segment, source.AllowSegmentVariant);
|
||||
|
||||
if (source.Id > 0)
|
||||
target.Id = source.Id;
|
||||
|
||||
@@ -241,7 +241,8 @@ namespace Umbraco.Web.Models.Mapping
|
||||
SortOrder = p.SortOrder,
|
||||
ContentTypeId = contentType.Id,
|
||||
ContentTypeName = contentType.Name,
|
||||
AllowCultureVariant = p.VariesByCulture()
|
||||
AllowCultureVariant = p.VariesByCulture(),
|
||||
AllowSegmentVariant = p.VariesBySegment()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user