public override async Task <IDisplayResult> UpdateAsync(ContentPartFieldDefinition partFieldDefinition, UpdatePartFieldEditorContext context)
        {
            var model = new ContentPickerFieldSettings();

            await context.Updater.TryUpdateModelAsync(model, Prefix);

            context.Builder.WithSettings(model);

            return(Edit(partFieldDefinition));
        }
Пример #2
0
        public override async Task <IDisplayResult> UpdateAsync(ContentPartFieldDefinition partFieldDefinition, UpdatePartFieldEditorContext context)
        {
            var model = new ContentPickerFieldSettings();

            await context.Updater.TryUpdateModelAsync(model, Prefix);

            if (model.DisplayAllContentTypes)
            {
                model.DisplayedContentTypes = Array.Empty <String>();
            }

            context.Builder.WithSettings(model);

            return(Edit(partFieldDefinition));
        }