Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit ac760a9

Browse files
committed
Updated "notes" editor to hold the markup
Instead of building it up in C# code and passing it as config.
1 parent 4204ee1 commit ac760a9

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/App_Plugins/CustomValueConverter/notes.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@
33
- License, v. 2.0. If a copy of the MPL was not distributed with this
44
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
55

6-
<div class="umb-readonlyvalue" ng-bind-html="model.config.notes | safe_html"></div>
6+
<div class="umb-readonlyvalue">
7+
<details class="well well-small">
8+
<summary><strong ng-bind="model.config.heading"></strong></summary>
9+
<div ng-bind-html="model.config.message | safe_html"></div>
10+
</details>
11+
</div>

src/DataEditor/CustomValueConverterConfigurationEditor.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,11 @@ public CustomValueConverterConfigurationEditor(
5353
View = ioHelper.ResolveRelativeOrVirtualUrl(NotesViewPath),
5454
Config = new Dictionary<string, object>
5555
{
56-
{ "notes", @"<details class=""well well-small"">
57-
<summary><strong>A note about changing the default value converter.</strong></summary>
58-
<p>Some of Umbraco's built-in value converters are designed to work explicitly with their associated property editor and data type configuration.</p>
56+
{ "heading", "A note about changing the default value converter." },
57+
{ "message", @"<p>Some of Umbraco's built-in value converters are designed to work explicitly with their associated property editor and data type configuration.</p>
5958
<p>This means they may not be hot-swappable. For example, the <code>MediaPicker</code> and <code>MultiNodeTreePicker</code> value converters will try to detect if the data type is configured for single or multiple use. So if you wanted to change the value converter for a textstring editor, then the target value converter would not be aware of the intended configuration, and potentially cause an error.</p>
6059
<p>For primitive values, e.g. integer, decimal, string, boolean. These should work as expected.</p>
61-
<p>If you are using you own custom value converter code, then you don't need to be concerned with this note, you will have full control over the value conversion.</p>
62-
</details>" },
60+
<p>If you are using you own custom value converter code, then you don't need to be concerned with this note, you will have full control over the value conversion.</p>" },
6361
},
6462
HideLabel = true,
6563
});

0 commit comments

Comments
 (0)