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

            yield return DefinitionTemplate(model);
        }
示例#2
0
        public override IEnumerable <TemplateViewModel> PartFieldEditorUpdate(ContentPartFieldDefinitionBuilder builder, IUpdateModel updateModel)
        {
            var model = new DateTimeFieldSettings();

            if (updateModel.TryUpdateModel(model, "DateTimeFieldSettings", null, null))
            {
                builder.WithSetting("DateTimeFieldSettings.Display", model.Display.ToString());
            }

            yield return(DefinitionTemplate(model));
        }