sou 7 лет назад
Родитель
Сommit
f5e5768a9f
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      lib/views/modal/create_page.html

+ 6 - 0
lib/views/modal/create_page.html

@@ -78,6 +78,12 @@
     $.get(`/_api/page.template?path=${pagePath}`)
     .then(templateInfo => {
       console.log('data', templateInfo);
+      // merge master and change variable name to childrenTemplateExists and decendantsTemplateExists
+      let buttonTextChildren = templateInfo.localTemplateExists ? 'Edit' : 'Create';
+      let buttonTextDecendants = templateInfo.globalTemplateExists ? 'Edit' : 'Create';
+      console.log(buttonTextChildren)
+      console.log(buttonTextDecendants)
+
     });
 
     $("#template-type").on("change", () => {