#20026: Making Custom Forms not draftable

Work Item: 20026
This commit is contained in:
Sebastien Ros 2013-10-23 16:18:36 -07:00
parent fcae27240c
commit fc715b59ef
2 changed files with 9 additions and 1 deletions

View File

@ -42,7 +42,7 @@ namespace Orchard.CustomForms.Controllers {
if (options == null)
options = new CustomFormIndexOptions();
var query = Services.ContentManager.Query().ForType("CustomForm", "CustomFormWidget");
var query = Services.ContentManager.Query().ForType("CustomForm", "CustomFormWidget").ForVersion(VersionOptions.Latest);
switch (options.Filter) {
case CustomFormFilter.All:

View File

@ -45,6 +45,14 @@ namespace Orchard.CustomForms {
return 2;
}
public int UpdateFrom2() {
ContentDefinitionManager.AlterTypeDefinition("CustomForm", cfg =>
cfg.Draftable(false)
);
return 3;
}
public void Uninstall() {
ContentDefinitionManager.DeleteTypeDefinition("CustomForm");
}