# HG changeset patch # User Fadi Abbud # Date 1557412833 -7200 # Node ID 6d4d8e7ef881c030a9afafd854d28d129446034e # Parent d84c64c0f5100fd4b5c2cbfe1b4c61d364637d42 client: adjust route for pdftemplate,pdftool and add check type to uploaded templates diff -r d84c64c0f510 -r 6d4d8e7ef881 client/src/components/Pdftool.vue --- a/client/src/components/Pdftool.vue Thu May 09 16:16:37 2019 +0200 +++ b/client/src/components/Pdftool.vue Thu May 09 16:40:33 2019 +0200 @@ -211,12 +211,18 @@ // applied to the rest of the form. applyTemplateToForm() { if (this.form.template) { - HTTP.get("/templates/" + this.form.template.name, { - headers: { - "X-Gemma-Auth": localStorage.getItem("token"), - "Content-type": "text/xml; charset=UTF-8" + HTTP.get( + "/templates/" + + this.form.template.type + + "/" + + this.form.template.name, + { + headers: { + "X-Gemma-Auth": localStorage.getItem("token"), + "Content-type": "text/xml; charset=UTF-8" + } } - }) + ) .then(response => { this.templateData = response.data.template_data; this.form.format = this.templateData.properties.format; @@ -941,7 +947,7 @@ mounted() { this.form.template = this.templates[0]; this.templateData = this.form.template; - HTTP.get("/templates", { + HTTP.get("/templates/map", { headers: { "X-Gemma-Auth": localStorage.getItem("token"), "Content-type": "text/xml; charset=UTF-8" diff -r d84c64c0f510 -r 6d4d8e7ef881 client/src/components/systemconfiguration/PDFTemplates.vue --- a/client/src/components/systemconfiguration/PDFTemplates.vue Thu May 09 16:16:37 2019 +0200 +++ b/client/src/components/systemconfiguration/PDFTemplates.vue Thu May 09 16:40:33 2019 +0200 @@ -43,6 +43,25 @@ +
+ + +
+
+ + +