Browse Source

Shows number of uploaded documents per row

currency
7u83 4 years ago
parent
commit
1989a8f4b9
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      kaform.js

+ 6
- 4
kaform.js View File

@ -136,15 +136,16 @@ function addTableRow(){
showAlert("Bitte gib einen gültigen Betrag ein!"); showAlert("Bitte gib einen gültigen Betrag ein!");
return; return;
} }
a_amount = parseFloat(a_amount).toFixed(2);
var a_currency = document.getElementById("a_currency").value; var a_currency = document.getElementById("a_currency").value;
if (!a_currency.trim().length){
/* if (!a_currency.trim().length){
document.getElementById("a_currency").focus(); document.getElementById("a_currency").focus();
showAlert("Bitte gib eine Währung an!"); showAlert("Bitte gib eine Währung an!");
return; return;
} }
*/
var target = document.getElementById("upload-target"+currentRowId); var target = document.getElementById("upload-target"+currentRowId);
var children = target.children; var children = target.children;
@ -178,7 +179,7 @@ function addTableRow(){
// add column for num // add column for num
e += `<td>${a_amount}
e += `<td>${a_amount} EUR
<input type="hidden" name="amount[${currentRowId}]" value="${a_amount}" /></td>`; <input type="hidden" name="amount[${currentRowId}]" value="${a_amount}" /></td>`;
@ -198,7 +199,8 @@ function addTableRow(){
</div> </div>
</td> </td>
*/ */
e += `<td>${a_currency}
var ulfiles = children.length;
e += `<td>${ulfiles}
<input type="hidden" name="currency[${currentRowId}]" value="${a_currency}" /></td> <input type="hidden" name="currency[${currentRowId}]" value="${a_currency}" /></td>
</td>`; </td>`;

Loading…
Cancel
Save