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);
        }
Exemplo n.º 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));
        }