mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-08 00:14:31 +08:00
Binding in ContentType editor (#7886)
Change the prefix so that binding does not care whether parts are in a different order in the type definition
This commit is contained in:

committed by
Sébastien Ros

parent
3152bb131a
commit
584ba97b27
@@ -19,7 +19,7 @@ namespace Orchard.ContentTypes.ViewModels {
|
||||
}
|
||||
|
||||
public int Index { get; set; }
|
||||
public string Prefix { get { return "Fields[" + Index + "]"; } }
|
||||
public string Prefix { get { return "Fields[" + Name + "]"; } }
|
||||
public EditPartViewModel Part { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
@@ -29,4 +29,4 @@ namespace Orchard.ContentTypes.ViewModels {
|
||||
public SettingsDictionary Settings { get; set; }
|
||||
public ContentPartFieldDefinition _Definition { get; private set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ namespace Orchard.ContentTypes.ViewModels {
|
||||
}
|
||||
|
||||
public int Index { get; set; }
|
||||
public string Prefix { get { return "Parts[" + Index + "]"; } }
|
||||
public string Prefix { get { return "Parts[" + PartDefinition.Name + "]"; } }
|
||||
public EditPartViewModel PartDefinition { get; set; }
|
||||
public SettingsDictionary PartSettings { get; set; }
|
||||
public SettingsDictionary Settings { get; set; }
|
||||
@@ -29,4 +29,4 @@ namespace Orchard.ContentTypes.ViewModels {
|
||||
get { return PartSettings.ContainsKey("ContentPartSettings.Description") ? PartSettings["ContentPartSettings.Description"] : null; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user