From aa60f276ed1e08ce150e673f6d231aafa9cdbb48 Mon Sep 17 00:00:00 2001 From: 7u83 <7u83> Date: Thu, 16 Apr 2020 20:51:41 +0000 Subject: [PATCH] Sends only mails, when positions all have files attached --- kaform.js | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/kaform.js b/kaform.js index 05687a6..dfe60b2 100644 --- a/kaform.js +++ b/kaform.js @@ -11,6 +11,17 @@ function renumberTableRows(){ return i; } +function isMailable(){ + var row_no=1; + var table = document.getElementById("tabbody"); + for (var i = 0, row; row = table.rows[i]; i++) { + var pdfs = row.cells[4].innerHTML; + if (pdfs==0) + return false; + } + return true; +} + function isFloat(val) { var floatRegex = /^-?\d+(?:[.,]\d*?)?$/; @@ -200,9 +211,7 @@ function addTableRow(){ */ var ulfiles = children.length; - e += `