public override IEnumerable<TemplateViewModel> TypeEditorUpdate(ContentTypeDefinitionBuilder builder, IUpdateModel updateModel) { var settings = builder.Current.Settings; if (settings.ContainsKey("Stereotype") && settings["Stereotype"] == "Media") { var model = new MediaFileNameEditorSettings(); if (updateModel.TryUpdateModel(model, "MediaFileNameEditorSettings", null, null)) { builder.WithSetting("MediaFileNameEditorSettings.ShowFileNameEditor", model.ShowFileNameEditor.ToString()); } } return base.TypeEditorUpdate(builder, updateModel); }
public override IEnumerable <TemplateViewModel> TypeEditorUpdate(ContentTypeDefinitionBuilder builder, IUpdateModel updateModel) { var settings = builder.Current.Settings; if (settings.ContainsKey("Stereotype") && settings["Stereotype"] == "Media") { var model = new MediaFileNameEditorSettings(); if (updateModel.TryUpdateModel(model, "MediaFileNameEditorSettings", null, null)) { builder.WithSetting("MediaFileNameEditorSettings.ShowFileNameEditor", model.ShowFileNameEditor.ToString()); } } return(base.TypeEditorUpdate(builder, updateModel)); }