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); }
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)); }