|
|
@ -1,4 +1,3 @@ |
|
|
|
|
|
|
|
var currentRowId=1; |
|
|
|
var banktype = "bank-eu"; |
|
|
|
|
|
|
@ -23,7 +22,7 @@ function checkAllRows(){ |
|
|
|
var v =row.cells[f].firstElementChild.value; |
|
|
|
if ( !v ){ // Datum
|
|
|
|
row.cells[f].firstElementChild.focus(); |
|
|
|
showAlert("Bitte gib ein gültiges Datum an!"); |
|
|
|
showAlert(error_alert_date); |
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
@ -32,7 +31,7 @@ function checkAllRows(){ |
|
|
|
v =row.cells[f].firstElementChild.value; |
|
|
|
if ( !v ){ // Datum
|
|
|
|
row.cells[f].firstElementChild.focus(); |
|
|
|
showAlert("Bitte gib ein Beschreibung ein!"); |
|
|
|
showAlert(error_alert_description); |
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
@ -41,7 +40,7 @@ function checkAllRows(){ |
|
|
|
v =row.cells[f].firstElementChild.value; |
|
|
|
if ( !isFloat(v) ){ // Amount
|
|
|
|
row.cells[f].firstElementChild.focus(); |
|
|
|
showAlert("Bitte gib einen gültigen Betrag ein!"); |
|
|
|
showAlert(error_alert_sum); |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
@ -148,7 +147,7 @@ function getUploadField(rid) |
|
|
|
data-url="upload.php?row=${rid}" data-url-remove="delete.php" |
|
|
|
data-progress="true" |
|
|
|
data-size="40" |
|
|
|
data-placeholder="Datei"> |
|
|
|
data-placeholder="` + expenses_table_file_placeholder + `"> |
|
|
|
</div> |
|
|
|
<div id="upload-target${rid}" class="upload-target small"></div> |
|
|
|
</div> |
|
|
@ -168,7 +167,7 @@ function getRow(rid,num) { |
|
|
|
+ `<input class="tab_input" name="date[${rid}]" value="" type="date" placeholder="Datum*"/>` |
|
|
|
+ "</td>" |
|
|
|
+ "<td data-label=\"Beschr.\">" |
|
|
|
+ `<input class="tab_input" name="desc[${rid}]" type="text" placeholder="Beschreibung"/>` |
|
|
|
+ `<input class="tab_input" name="desc[${rid}]" type="text" placeholder=` + expenses_table_description_placeholder + `/>` |
|
|
|
+ "</td>" |
|
|
|
+ "<td data-label=\"Betrag\">" |
|
|
|
+ `<input class="tab_input" name="amount[${rid}] type="text" placeholder="0.00"/>` |
|
|
@ -293,25 +292,25 @@ function downloadDocument(mail) |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
if (!check_field("projectid", "Bitte gib einen Projektnamen/Zweck der Reise an!")) |
|
|
|
if (!check_field("projectid", error_alert_projectid)) |
|
|
|
return; |
|
|
|
|
|
|
|
if (!check_field("realname", "Bitte gib deinen Realnamen an!")) |
|
|
|
if (!check_field("realname", error_alert_realname)) |
|
|
|
return; |
|
|
|
|
|
|
|
if (!check_field("email", "Bitte gib deinen E-Mail-Adresse an!")) |
|
|
|
if (!check_field("email", error_alert_email)) |
|
|
|
return; |
|
|
|
|
|
|
|
if (banktype == "bank-eu"){ |
|
|
|
iban = document.getElementById('iban'); |
|
|
|
if (!IBAN.isValid(iban.value)){ |
|
|
|
document.getElementById("iban").focus(); |
|
|
|
showAlert("Bitte gib eine korrekte IBAN ein!"); |
|
|
|
showAlert(error_alert_iban); |
|
|
|
return; |
|
|
|
} |
|
|
|
/* if (!document.getElementById('bic').value.trim().length){ |
|
|
|
document.getElementById("bic").focus(); |
|
|
|
showAlert("Bitte gib einen korrekte BIC an!"); |
|
|
|
showAlert(error_alert_bic); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
@ -322,7 +321,7 @@ function downloadDocument(mail) |
|
|
|
ii = document.getElementById('paypal'); |
|
|
|
if (!document.getElementById('paypal').value.trim().length){ |
|
|
|
document.getElementById("paypal").focus(); |
|
|
|
showAlert("Bitte gib einen PayPal Account an!"); |
|
|
|
showAlert(error_alert_paypal); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -330,20 +329,20 @@ function downloadDocument(mail) |
|
|
|
|
|
|
|
if (countRows()==0){ |
|
|
|
document.getElementById("add_issue").focus(); |
|
|
|
showAlert("Bitte füge mind. eine Auslage hinzu!"); |
|
|
|
showAlert(error_alert_expenses); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (!document.getElementById("agree").checked){ |
|
|
|
document.getElementById("agree").focus(); |
|
|
|
showAlert("Bitte bestätige, dass du alle Angaben nach bestem Wissen und Gewissen gemacht hast!"); |
|
|
|
showAlert(error_alert_agreement); |
|
|
|
return; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
if (mail){ |
|
|
|
if (!isMailable()){ |
|
|
|
showAlert("Um den Antrag elektronisch direkt an WMDE zu schicken, muss jeder Position ein Beleg beigefügt sein."); |
|
|
|
showAlert(error_alert_ismailable); |
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
@ -388,5 +387,3 @@ function checkIban() |
|
|
|
} |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|