protected override DriverResult Editor(ContentPart part, Fields.AgileUploaderField field, IUpdateModel updater, dynamic shapeHelper) { var viewModel = new AgileUploaderFieldViewModel { Field = field }; updater.TryUpdateModel(viewModel, GetPrefix(field, part), null, null); return(Editor(part, field, shapeHelper)); }
protected override DriverResult Editor(ContentPart part, Fields.AgileUploaderField field, dynamic shapeHelper) { var settings = field.PartFieldDefinition.Settings.GetModel <AgileUploaderFieldSettings>(); var agileUploaderMediaFolder = GetAgileUploaderMediaFolder(part, field, settings); var viewModel = new AgileUploaderFieldViewModel { Settings = settings, AgileUploaderMediaFolder = agileUploaderMediaFolder, Field = field }; return(ContentShape("Fields_AgileUploader_Edit", GetDifferentiator(field, part), () => shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: viewModel, Prefix: GetPrefix(field, part)))); }