public override IEnumerable<TemplateViewModel> TypePartEditorUpdate(global::Orchard.ContentManagement.MetaData.Builders.ContentTypePartDefinitionBuilder builder, global::Orchard.ContentManagement.IUpdateModel updateModel)
        {
            if (builder.Name != "CreateNotificationPart")
                yield break;
            var model = new CreateNotificationTypePartSettings();
            updateModel.TryUpdateModel(model, "CreateNotificationTypePartSettings", null, null);
            builder.WithSetting("CreateNotificationTypePartSettings.NotifyOwner",
                (model.NotifyOwner).ToString());
            builder.WithSetting("CreateNotificationTypePartSettings.NotifyContainerOwner",
                (model.NotifyContainerOwner).ToString());

            builder.WithSetting("CreateNotificationTypePartSettings.UsersToNotify",
                (model.UsersToNotify));

            yield return DefinitionTemplate(model);
        }
Example #2
0
        public override IEnumerable <TemplateViewModel> TypePartEditorUpdate(global::Orchard.ContentManagement.MetaData.Builders.ContentTypePartDefinitionBuilder builder, global::Orchard.ContentManagement.IUpdateModel updateModel)
        {
            if (builder.Name != "CreateNotificationPart")
            {
                yield break;
            }
            var model = new CreateNotificationTypePartSettings();

            updateModel.TryUpdateModel(model, "CreateNotificationTypePartSettings", null, null);
            builder.WithSetting("CreateNotificationTypePartSettings.NotifyOwner",
                                (model.NotifyOwner).ToString());
            builder.WithSetting("CreateNotificationTypePartSettings.NotifyContainerOwner",
                                (model.NotifyContainerOwner).ToString());

            builder.WithSetting("CreateNotificationTypePartSettings.UsersToNotify",
                                (model.UsersToNotify));

            yield return(DefinitionTemplate(model));
        }