Fixes 2 little issues in dev around the TextField default values

This commit is contained in:
andy zheng
2016-03-06 21:58:38 -05:00
parent a91b06f1b5
commit a92ef7c4de

View File

@@ -272,8 +272,8 @@ namespace Orchard.ContentTypes.Services {
_contentDefinitionEventHandlers.ContentPartRemoved(new ContentPartRemovedContext {ContentPartDefinition = partDefinition});
}
public IEnumerable<ContentFieldInfo> GetFields() {
return _contentFieldDrivers.SelectMany(d => d.GetFieldInfo());
public IEnumerable<ContentFieldInfo> GetFields() {
return _contentFieldDrivers.SelectMany(d => d.GetFieldInfo()).GroupBy(x => x.FieldTypeName).Select(g => g.First());
}
public void AddFieldToPart(string fieldName, string fieldTypeName, string partName) {