Changed order of checks for empty fields
This commit is contained in:
parent
0f09df986b
commit
ca58eba355
1 changed files with 17 additions and 15 deletions
32
kaform.js
32
kaform.js
|
@ -327,21 +327,14 @@ function downloadDocument1(){
|
||||||
|
|
||||||
function downloadDocument(mail)
|
function downloadDocument(mail)
|
||||||
{
|
{
|
||||||
/* if (!check_field("nickname", "Bitte gib deinen Nicknamen an!"))
|
if (!check_field("projectid", "Bitte gib einen Projektnamen/Zweck der Reise an!"))
|
||||||
return;
|
return;
|
||||||
*/ if (!check_field("realname", "Bitte gib deinen Realnamen an!"))
|
|
||||||
|
if (!check_field("realname", "Bitte gib deinen Realnamen an!"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!check_field("email", "Bitte gib deinen E-Mail-Adresse an!"))
|
if (!check_field("email", "Bitte gib deinen E-Mail-Adresse an!"))
|
||||||
return;
|
return;
|
||||||
if (!check_field("projectid", "Bitte gib einen Projektnamen/Zweck der Reise an!"))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (countRows()==0){
|
|
||||||
document.getElementById("a_description").focus();
|
|
||||||
showAlert("Bitte füge mind. eine Auslage hinzu!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (banktype == "bank-eu"){
|
if (banktype == "bank-eu"){
|
||||||
iban = document.getElementById('iban');
|
iban = document.getElementById('iban');
|
||||||
|
@ -369,11 +362,12 @@ function downloadDocument(mail)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!document.getElementById("agree").checked){
|
if (countRows()==0){
|
||||||
document.getElementById("agree").focus();
|
document.getElementById("a_description").focus();
|
||||||
showAlert("Bitte bestätige, dass du alle Angaben nach bestem Wissen und Gewissen gemacht hast!");
|
showAlert("Bitte füge mind. eine Auslage hinzu!");
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
if (mail){
|
if (mail){
|
||||||
if (!isMailable()){
|
if (!isMailable()){
|
||||||
|
@ -387,12 +381,20 @@ function downloadDocument(mail)
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
document.getElementById('sendmail').value="no";
|
document.getElementById('sendmail').value="no";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
document.getElementById('banktype').value=banktype;
|
document.getElementById('banktype').value=banktype;
|
||||||
document.getElementById("theform").submit();
|
document.getElementById("theform").submit();
|
||||||
|
|
||||||
|
if (!document.getElementById("agree").checked){
|
||||||
|
document.getElementById("agree").focus();
|
||||||
|
showAlert("Bitte bestätige, dass du alle Angaben nach bestem Wissen und Gewissen gemacht hast!");
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue