Skip to content

Commit 1a32bc2

Browse files
committed
add label to content types in manage modal
1 parent 92ab8a3 commit 1a32bc2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

plugins/manage/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const handleManagePlugin = (
1212

1313
const ctds = (contentTypes || [])
1414
.filter((ctd) => !ctd.internal || ctd.name === '_media')
15-
.map(({ name }) => name);
15+
.map(({ name, label }) => ({ value: name, label }));
1616

1717
configCache = {};
1818

plugins/manage/settings-schema.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export function getSettingsSchema(pluginInfo, ctds) {
2929
},
3030
content_types: {
3131
type: 'array',
32-
minLength: 1,
3332
},
3433
displayName: {
3534
type: 'string',
@@ -76,10 +75,12 @@ export function getSettingsSchema(pluginInfo, ctds) {
7675
content_types: {
7776
label: 'Content types',
7877
unique: false,
79-
options: ctds,
80-
helpText: '',
78+
helpText:
79+
'If the content types are not selected, the button will be shown when editing each content object.',
8180
inputType: 'select',
8281
isMultiple: true,
82+
useOptionsWithLabels: true,
83+
optionsWithLabels: ctds,
8384
},
8485
displayName: {
8586
label: 'Display name',

0 commit comments

Comments
 (0)