Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow querystring parameters to set IsElementType checkbox on create document type route #6779

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
var documentTypeId = $routeParams.id;
var create = $routeParams.create;
var noTemplate = $routeParams.notemplate;
var isElement = $routeParams.iselement;
var allowVaryByCulture = $routeParams.culturevary;
var infiniteMode = $scope.model && $scope.model.infiniteMode;

vm.save = save;
Expand Down Expand Up @@ -60,6 +62,8 @@
documentTypeId = $scope.model.id;
create = $scope.model.create;
noTemplate = $scope.model.notemplate;
isElement = $scope.model.isElement;
allowVaryByCulture = $scope.model.allowVaryByCulture;
vm.submitButtonKey = "buttons_saveAndClose";
vm.generateModelsKey = "buttons_generateModelsAndClose";
}
Expand Down Expand Up @@ -427,7 +431,14 @@
contentType.defaultTemplate = contentTypeHelper.insertDefaultTemplatePlaceholder(contentType.defaultTemplate);
contentType.allowedTemplates = contentTypeHelper.insertTemplatePlaceholder(contentType.allowedTemplates);
}

// set isElement checkbox by default
if (isElement) {
contentType.isElement = true;
}
// set vary by culture checkbox by default
if (allowVaryByCulture) {
contentType.allowCultureVariant = true;
}
// convert icons for content type
convertLegacyIcons(contentType);

Expand Down