From 38c42c2479c45e8639d5adacfc387a4b8edf6abb Mon Sep 17 00:00:00 2001
From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Date: Mon, 11 Jul 2022 14:02:20 +0200
Subject: [PATCH] Update media picker to support readonly
---
.../PropertyEditors/MediaPickerPropertyEditor.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MediaPickerPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/MediaPickerPropertyEditor.cs
index 93f051bfe8..ccc604ef72 100644
--- a/src/Umbraco.Infrastructure/PropertyEditors/MediaPickerPropertyEditor.cs
+++ b/src/Umbraco.Infrastructure/PropertyEditors/MediaPickerPropertyEditor.cs
@@ -52,6 +52,7 @@ public class MediaPickerPropertyEditor : DataEditor
{
_ioHelper = ioHelper;
_editorConfigurationParser = editorConfigurationParser;
+ SupportsReadOnly = true;
}
///
@@ -69,9 +70,8 @@ public class MediaPickerPropertyEditor : DataEditor
IJsonSerializer jsonSerializer,
IIOHelper ioHelper,
DataEditorAttribute attribute)
- : base(localizedTextService, shortStringHelper, jsonSerializer, ioHelper, attribute)
- {
- }
+ : base(localizedTextService, shortStringHelper, jsonSerializer, ioHelper, attribute) =>
+ SupportsReadOnly = true;
public IEnumerable GetReferences(object? value)
{