Fixes change doc type to use the prop alias instead of the guid
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
<%# DataBinder.Eval(Container, "DataItem.Name") %>
|
||||
<asp:HiddenField ID="Alias" runat="server" Value='<%#DataBinder.Eval(Container, "DataItem.Alias")%>' />
|
||||
<asp:HiddenField ID="Name" runat="server" Value='<%#DataBinder.Eval(Container, "DataItem.Name")%>' />
|
||||
<asp:HiddenField ID="DataTypeId" runat="server" Value='<%#DataBinder.Eval(Container, "DataItem.DataTypeId")%>' />
|
||||
<asp:HiddenField ID="PropertyEditorAlias" runat="server" Value='<%#DataBinder.Eval(Container, "DataItem.PropertyEditorAlias")%>' />
|
||||
</td>
|
||||
<td><asp:DropDownList id="DestinationProperty" runat="server" /></td>
|
||||
</tr>
|
||||
|
||||
@@ -141,13 +141,11 @@ namespace Umbraco.Web.UI.Umbraco.Dialogs
|
||||
if (ri.ItemType == ListItemType.Item || ri.ItemType == ListItemType.AlternatingItem)
|
||||
{
|
||||
// Get data type from hidden field
|
||||
var dataTypeId = Guid.Parse(((HiddenField)ri.FindControl("DataTypeId")).Value);
|
||||
|
||||
//TODO: Change this logic as it will not be backwards compatible with Belle if there's no GUID -> Alias mapping!
|
||||
var propEdAlias = ((HiddenField)ri.FindControl("PropertyEditorAlias")).Value;
|
||||
|
||||
// Bind destination list with properties that match data type
|
||||
var ddl = (DropDownList)ri.FindControl("DestinationProperty");
|
||||
ddl.DataSource = properties.Where(x => x.DataTypeId == dataTypeId);
|
||||
ddl.DataSource = properties.Where(x => x.PropertyEditorAlias == propEdAlias);
|
||||
ddl.DataValueField = "Alias";
|
||||
ddl.DataTextField = "Name";
|
||||
ddl.DataBind();
|
||||
|
||||
Reference in New Issue
Block a user