Fixes: U4-7347 Document type editor template name and alias get set to null
This commit is contained in:
@@ -240,26 +240,6 @@ function contentTypeHelper(contentTypeResource, dataTypeResource, $filter) {
|
||||
|
||||
return array;
|
||||
|
||||
},
|
||||
|
||||
updateTemplatePlaceholder: function(contentType) {
|
||||
|
||||
// update default template
|
||||
if(contentType.defaultTemplate !== null && contentType.defaultTemplate.placeholder) {
|
||||
contentType.defaultTemplate.name = contentType.name;
|
||||
contentType.defaultTemplate.alias = contentType.alias;
|
||||
}
|
||||
|
||||
// update allowed template
|
||||
angular.forEach(contentType.allowedTemplates, function(allowedTemplate){
|
||||
if(allowedTemplate.placeholder) {
|
||||
allowedTemplate.name = contentType.name;
|
||||
allowedTemplate.alias = contentType.alias;
|
||||
}
|
||||
});
|
||||
|
||||
return contentType;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -149,11 +149,6 @@
|
||||
// reformat allowed content types to array if id's
|
||||
vm.contentType.allowedContentTypes = contentTypeHelper.createIdArray(vm.contentType.allowedContentTypes);
|
||||
|
||||
// update placeholder template information on new doc types
|
||||
if (!$routeParams.notemplate && vm.contentType.id === 0) {
|
||||
vm.contentType = contentTypeHelper.updateTemplatePlaceholder(vm.contentType);
|
||||
}
|
||||
|
||||
contentEditingHelper.contentEditorPerformSave({
|
||||
statusMessage: "Saving...",
|
||||
saveMethod: contentTypeResource.save,
|
||||
|
||||
Reference in New Issue
Block a user