Exemplo n.º 1
0
 public override IEnumerable<TemplateViewModel> TypePartEditorUpdate(ContentTypePartDefinitionBuilder builder, IUpdateModel updateModel) {
     if (builder.Name == "CommonPart") {
         var model = new DateEditorSettings();
         if (updateModel.TryUpdateModel(model, "DateEditorSettings", null, null)) {
             builder.WithSetting("DateEditorSettings.ShowDateEditor", model.ShowDateEditor.ToString());
         }
         yield return DefinitionTemplate(model);
     }
 }
Exemplo n.º 2
0
 public override IEnumerable <TemplateViewModel> TypePartEditorUpdate(ContentTypePartDefinitionBuilder builder, IUpdateModel updateModel)
 {
     if (builder.Name == "CommonPart")
     {
         var model = new DateEditorSettings();
         if (updateModel.TryUpdateModel(model, "DateEditorSettings", null, null))
         {
             builder.WithSetting("DateEditorSettings.ShowDateEditor", model.ShowDateEditor.ToString());
         }
         yield return(DefinitionTemplate(model));
     }
 }