public override IEnumerable<TemplateViewModel> PartFieldEditorUpdate(ContentPartFieldDefinitionBuilder builder, IUpdateModel updateModel) {
            var model = new ChoiceListFieldSettings();
            if (updateModel.TryUpdateModel(model, "ChoiceListFieldSettings", null, null))
            {
                builder.WithSetting("ChoiceListFieldSettings.Options", model.Options);
                builder.WithSetting("ChoiceListFieldSettings.ListMode", model.ListMode);
            }

            yield return DefinitionTemplate(model);
        }
Пример #2
0
        public override IEnumerable <TemplateViewModel> PartFieldEditorUpdate(ContentPartFieldDefinitionBuilder builder, IUpdateModel updateModel)
        {
            var model = new ChoiceListFieldSettings();

            if (updateModel.TryUpdateModel(model, "ChoiceListFieldSettings", null, null))
            {
                builder.WithSetting("ChoiceListFieldSettings.Options", model.Options);
                builder.WithSetting("ChoiceListFieldSettings.ListMode", model.ListMode);
            }

            yield return(DefinitionTemplate(model));
        }