public override IEnumerable<TemplateViewModel> PartFieldEditorUpdate(ContentPartFieldDefinitionBuilder builder, IUpdateModel updateModel)
        {
            if (builder.FieldType != "HintField")
            {
                yield break;
            }

            var model = new HintFieldSettings();
            if (updateModel.TryUpdateModel(model, "HintFieldSettings", null, null))
            {
                builder.WithSetting("HintFieldSettings.Hint", model.Hint);

                yield return DefinitionTemplate(model);
            }
        }
Пример #2
0
        public override IEnumerable <TemplateViewModel> PartFieldEditorUpdate(ContentPartFieldDefinitionBuilder builder, IUpdateModel updateModel)
        {
            if (builder.FieldType != "HintField")
            {
                yield break;
            }

            var model = new HintFieldSettings();

            if (updateModel.TryUpdateModel(model, "HintFieldSettings", null, null))
            {
                builder.WithSetting("HintFieldSettings.Hint", model.Hint);

                yield return(DefinitionTemplate(model));
            }
        }