Slightly improve script and output

This commit is contained in:
Timotej Lazar 2023-05-22 08:31:12 +02:00
parent f3b938c9b5
commit 8322772696

View file

@ -188,19 +188,12 @@ document.querySelector("#savePDF").addEventListener("click", event => {
} }
var tipologija = document.getElementById("tipologija").value var tipologija = document.getElementById("tipologija").value
var prispevki = document.getElementById("prispevki").value var prispevki = document.getElementById("prispevki").value
var priloge = "Priloga: " var date = "Datum: " + (new Date()).toLocaleDateString("sl");
var datum = new Date();
var date = "Datum: " + datum.getDate() + ". " + (datum.getMonth()+1) + ". " + datum.getFullYear()
if (document.getElementById("fotokopija").checked){ var priloge = "Priloge: "
var fotokopija = document.getElementById("fotokopija").value for (const priloga of ["fotokopija", "dokazila", "final"])
priloge = priloge + ", " + fotokopija if (document.getElementById(priloga).checked)
} priloge += "\n" + "- " + document.getElementById(priloga).value
if (document.getElementById("dokazila").checked){
var dokazila = document.getElementById("dokazila").value
priloge = priloge + ", " + dokazila
}
var docDefinition = { var docDefinition = {
defaultStyle: { fontSize: 12 }, defaultStyle: { fontSize: 12 },