fix(stack): make web editor readonly for git template EE-6706 (#11182)
parent
af8fde66b0
commit
9ec7394124
|
@ -204,6 +204,9 @@ class CustomTemplatesViewController {
|
|||
|
||||
const template = _.find(this.templates, { Id: templateId });
|
||||
|
||||
const isGit = template.GitConfig !== null;
|
||||
this.state.isEditorReadOnly = isGit;
|
||||
|
||||
try {
|
||||
this.state.templateContent = this.formValues.fileContent = await this.CustomTemplateService.customTemplateFile(template.Id, template.GitConfig !== null);
|
||||
} catch (err) {
|
||||
|
|
|
@ -302,10 +302,11 @@ angular
|
|||
$scope.state.selectedTemplate = template;
|
||||
|
||||
try {
|
||||
$scope.state.templateContent = await this.CustomTemplateService.customTemplateFile(templateId, template.GitConfig !== null);
|
||||
const isGit = template.GitConfig !== null;
|
||||
$scope.state.templateContent = await this.CustomTemplateService.customTemplateFile(templateId, isGit);
|
||||
onChangeFileContent($scope.state.templateContent);
|
||||
|
||||
$scope.state.isEditorReadOnly = false;
|
||||
$scope.state.isEditorReadOnly = isGit;
|
||||
} catch (err) {
|
||||
$scope.state.templateLoadFailed = true;
|
||||
throw err;
|
||||
|
|
Loading…
Reference in New Issue