Skip to content

Commit

Permalink
Fix #5335 - Multiple Media Picker not available as macro parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
nul800sebastiaan committed Aug 19, 2019
1 parent e4f19f7 commit 1f2c4e3
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Umbraco.Core/Constants-PropertyEditors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ public static class Aliases
/// </summary>
public const string MediaPicker = "Umbraco.MediaPicker";

/// <summary>
/// Multiple Media Picker.
/// </summary>
public const string MultipleMediaPicker = "Umbraco.MultipleMediaPicker";

/// <summary>
/// Member Picker.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.PropertyEditors;

namespace Umbraco.Web.PropertyEditors.ParameterEditors
{
/// <summary>
/// Represents a multiple media picker macro parameter editor.
/// </summary>
[DataEditor(
Constants.PropertyEditors.Aliases.MultipleMediaPicker,
EditorType.MacroParameter,
"Multiple Media Picker",
"mediapicker",
ValueType = ValueTypes.Text)]
public class MultipleMediaPickerParameterEditor : DataEditor
{
/// <summary>
/// Initializes a new instance of the <see cref="MultipleMediaPickerParameterEditor"/> class.
/// </summary>
public MultipleMediaPickerParameterEditor(ILogger logger)
: base(logger)
{
DefaultConfiguration.Add("multiPicker", "1");
}
}
}
1 change: 1 addition & 0 deletions src/Umbraco.Web/Umbraco.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@
<Compile Include="Mvc\SurfaceControllerTypeCollectionBuilder.cs" />
<Compile Include="Mvc\ValidateUmbracoFormRouteStringAttribute.cs" />
<Compile Include="Profiling\WebProfilingController.cs" />
<Compile Include="PropertyEditors\ParameterEditors\MultipleMediaPickerParameterEditor.cs" />
<Compile Include="PublishedCache\NuCache\PublishedSnapshotServiceOptions.cs" />
<Compile Include="PublishedCache\NuCache\Snap\GenObj.cs" />
<Compile Include="PublishedCache\NuCache\Snap\GenRef.cs" />
Expand Down

0 comments on commit 1f2c4e3

Please sign in to comment.