Mercurial > gemma
changeset 2221:74c7d84f93d7 pdf-export
PDF generation: Don't change template on form changes.
Selecting a template also changes the other form fields to the according values of the template.
The bahavior was the same in the other direction. If you change something in the form, a matching
template was automatically selected. When there is no matching template, no template is selected
which leads to problems in the PDF generation. To make overriding template values possible
without unselecting the current template, this behavior was removed.
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 11 Feb 2019 10:26:03 +0100 |
parents | d926292d81b6 |
children | 318da99d406a |
files | client/src/components/Pdftool.vue |
diffstat | 1 files changed, 0 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/Pdftool.vue Mon Feb 11 10:16:48 2019 +0100 +++ b/client/src/components/Pdftool.vue Mon Feb 11 10:26:03 2019 +0100 @@ -30,7 +30,6 @@ </option> </select> <select - @change="compareFormWithTemplates" v-model="form.format" class="form-control form-control-sm d-block mb-2 w-100" > @@ -40,7 +39,6 @@ <div class="d-flex"> <div class="flex-fill mr-2"> <select - @change="compareFormWithTemplates" v-model="form.resolution" class="form-control form-control-sm mb-2 d-block w-100" > @@ -57,7 +55,6 @@ </div> <div class="flex-fill ml-2"> <select - @change="compareFormWithTemplates" v-model="form.paperSize" class="form-control form-control-sm mb-2 d-block w-100" > @@ -166,20 +163,6 @@ this.form.resolution = this.form.template.properties.resolution; } }, - // If there's a template that matches all the form values, this template - // will be set in the dropdown. - compareFormWithTemplates() { - this.form.template = null; - this.pdfTemplates.forEach(t => { - if ( - this.form.format === t.properties.format && - this.form.paperSize === t.properties.paperSize && - this.form.resolution === t.properties.resolution - ) { - this.form.template = t; - } - }); - }, download() { let template = this.form.template;