Ensures the correct DefaultConfiguration values are specified for any editor that is actively overriding ToValueEditor and setting these values there
This commit is contained in:
@@ -12,6 +12,13 @@ namespace Umbraco.Web.PropertyEditors
|
||||
.Config = new Dictionary<string, object> { { "idType", "udi" } };
|
||||
}
|
||||
|
||||
public override IDictionary<string, object> DefaultConfiguration => new Dictionary<string, object>
|
||||
{
|
||||
["idType"] = "udi",
|
||||
["showEditButton"] = false,
|
||||
["showPathOnHover"] = false,
|
||||
};
|
||||
|
||||
public override IDictionary<string, object> ToValueEditor(object configuration)
|
||||
{
|
||||
// these are not configuration fields, but constants required by the value editor
|
||||
|
||||
@@ -8,6 +8,11 @@ namespace Umbraco.Web.PropertyEditors
|
||||
/// </summary>
|
||||
public class DateConfigurationEditor : ConfigurationEditor<DateConfiguration>
|
||||
{
|
||||
public override IDictionary<string, object> DefaultConfiguration => new Dictionary<string, object>
|
||||
{
|
||||
["pickTime"] = false,
|
||||
};
|
||||
|
||||
public override IDictionary<string, object> ToValueEditor(object configuration)
|
||||
{
|
||||
var d = base.ToValueEditor(configuration);
|
||||
|
||||
@@ -8,6 +8,11 @@ namespace Umbraco.Web.PropertyEditors
|
||||
/// </summary>
|
||||
public class DateTimeConfigurationEditor : ConfigurationEditor<DateTimeConfiguration>
|
||||
{
|
||||
public override IDictionary<string, object> DefaultConfiguration => new Dictionary<string, object>
|
||||
{
|
||||
["pickTime"] = true,
|
||||
};
|
||||
|
||||
public override IDictionary<string, object> ToValueEditor(object configuration)
|
||||
{
|
||||
var d = base.ToValueEditor(configuration);
|
||||
|
||||
@@ -20,6 +20,11 @@ namespace Umbraco.Web.PropertyEditors
|
||||
};
|
||||
}
|
||||
|
||||
public override IDictionary<string, object> DefaultConfiguration => new Dictionary<string, object>
|
||||
{
|
||||
["idType"] = "udi"
|
||||
};
|
||||
|
||||
public override IDictionary<string, object> ToValueEditor(object configuration)
|
||||
{
|
||||
var d = base.ToValueEditor(configuration);
|
||||
@@ -27,4 +32,4 @@ namespace Umbraco.Web.PropertyEditors
|
||||
return d;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,14 @@ namespace Umbraco.Web.PropertyEditors
|
||||
return output;
|
||||
}
|
||||
|
||||
public override IDictionary<string, object> DefaultConfiguration => new Dictionary<string, object>
|
||||
{
|
||||
["multiPicker"] = true,
|
||||
["showEditButton"] = false,
|
||||
["showPathOnHover"] = false,
|
||||
["idType"] = "udi"
|
||||
};
|
||||
|
||||
/// <inheritdoc />
|
||||
public override IDictionary<string, object> ToValueEditor(object configuration)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user