Simplified forms, no "Auslagenart" anymore

This commit is contained in:
7u83 2020-03-04 11:01:42 +00:00
parent 4a8f38ac69
commit 38183ebb1b
2 changed files with 40 additions and 14 deletions

35
ka.php
View File

@ -93,7 +93,7 @@
<section id="bank-eu">
<div class="is-row">
<div class="is-col">
<input type="input" size="32" name="Owner" placeholder="Kontoinhaber" />
<input type="input" size="32" name="Owner" placeholder="Kontoinhaberin" />
</div>
<div class="is-col">
</div>
@ -111,7 +111,14 @@
</div>
</div>
<br>
<input type="input" size="32" id="purpose" name="purpose" placeholder="Verwendungszweck" />
<!-- <input type="input" size="32" id="purpose" name="purpose" placeholder="Verwendungszweck" /> -->
<textarea id="comments" name="comments"
style="resize:both;" cols="32" rows="4" placeholder="Weitere Anmerkungen
z.B. intermdiäre Bank,
Grund für abweichende Kontoinhaberin"></textarea>
</section>
@ -119,7 +126,7 @@
<section id="bank-noneu">
<div class="is-row">
<div class="is-col">
<input type="input" size="32" name="Owner" placeholder="Kontoinhaber" />
<input type="input" size="32" name="Owner" placeholder="Kontoinhaberin" />
</div>
<div class="is-col">
</div>
@ -148,7 +155,12 @@
<input type="input" size="32" id="n_purpose" name="n_purpose" placeholder="Verwendungszweck" />
<!-- <input type="input" size="32" id="n_purpose" name="n_purpose" placeholder="Verwendungszweck" /> -->
<textarea id="n_comments" name="n_comments"
style="resize:both;" cols="32" rows="4" placeholder="Weitere Anmerkungen
z.B. intermdiäre Bank,
Grund für abweichende Kontoinhaberin"></textarea>
</section>
@ -186,10 +198,11 @@
<div class="is-col is-70">
<div class="is-row">
<div class="is-col is-60">
<input id="a_type" type="text" name="type" placeholder="Auslagenart*"/>
<input id="a_date" type="date" name="type" placeholder="Datum*"/>
<!-- <input id="a_type" type="text" name="type" placeholder="Auslagenart*"/> -->
</div>
<div class="is-col is-40">
<input id="a_date" type="date" name="type" placeholder="Datum*"/>
</div>
</div>
<br>
@ -201,7 +214,13 @@
<input id="a_amount" type="text" name="amount" placeholder="Betrag*"/>
</div>
<div class="is-col">
<input id="a_currency" type="text" name="curreny" placeholder="Waehrung*"/>
<select id="a_currency" name="currency" >
<option value="EUR">EUR</option>
<option value="USD">USD</option>
<option value="CHF">CHF</option>
<option value="BTC">BTC</option>
</select>
<!-- <input id="a_currency" type="text" name="curreny" placeholder="Waehrung*"/> -->
</div>
<div class="is-col">
<button type="button" onclick="addTableRow();"
@ -219,7 +238,7 @@
<table id="tabtab" class="is-bordered is-striped">
<thead>
<tr>
<th>Auslagenart</th>
<!-- <th>Auslagenart</th>-->
<th>Datum</th>
<th>Beschreibung</th>
<th>Betrag</th>

View File

@ -77,7 +77,7 @@ function showAlert(text) {
function reset2()
{
document.getElementById("a_type").value="";
// document.getElementById("a_type").value="";
document.getElementById("a_description").value="";
document.getElementById("a_amount").value="";
setUploadField();
@ -92,13 +92,13 @@ function addTableRow(){
element.setAttribute("id", "trow"+currentRowId);
var a_type = document.getElementById("a_type").value;
/* var a_type = document.getElementById("a_type").value;
if (!a_type.trim().length ) {
document.getElementById("a_type").focus();
showAlert("Bitte gib eine Auslagenart an!");
return;
}
*/
var a_date = document.getElementById("a_date").value;
if (!a_date.trim().length){
document.getElementById("a_date").focus();
@ -146,8 +146,8 @@ function addTableRow(){
var e="";
// add column for position no
e += `<td>${a_type}
<input type="hidden" name="type[${currentRowId}]" value="${a_type}" /></td>`;
// e += `<td>${a_type}
// <input type="hidden" name="type[${currentRowId}]" value="${a_type}" /></td>`;
// add coluemn for a_type (Auslagenart)
// e += `<td><textarea name="desc[${nextRowId}]" rows="2"></textarea> </td>`;
@ -303,9 +303,16 @@ function downloadDocument()
iban = document.getElementById('iban');
if (!IBAN.isValid(iban.value)){
document.getElementById("iban").focus();
showAlert("Bitte igib eine korrekte IBAN ein!");
showAlert("Bitte gib eine korrekte IBAN ein!");
return;
}
if (!document.getElementById('bic').value.trim().length){
document.getElementById("bic").focus();
showAlert("Bitte gib einen koreekte BIC an!");
return;
}
}
if (banktype == "bank-paypal"){