forked from tohe/wmdeit_kaform
Changed order of checks for empty fields
This commit is contained in:
parent
0f09df986b
commit
ca58eba355
32
kaform.js
32
kaform.js
|
@ -327,21 +327,14 @@ function downloadDocument1(){
|
|||
|
||||
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;
|
||||
*/ if (!check_field("realname", "Bitte gib deinen Realnamen an!"))
|
||||
|
||||
if (!check_field("realname", "Bitte gib deinen Realnamen an!"))
|
||||
return;
|
||||
|
||||
if (!check_field("email", "Bitte gib deinen E-Mail-Adresse an!"))
|
||||
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"){
|
||||
iban = document.getElementById('iban');
|
||||
|
@ -369,11 +362,12 @@ function downloadDocument(mail)
|
|||
}
|
||||
|
||||
|
||||
if (!document.getElementById("agree").checked){
|
||||
document.getElementById("agree").focus();
|
||||
showAlert("Bitte bestätige, dass du alle Angaben nach bestem Wissen und Gewissen gemacht hast!");
|
||||
if (countRows()==0){
|
||||
document.getElementById("a_description").focus();
|
||||
showAlert("Bitte füge mind. eine Auslage hinzu!");
|
||||
return;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
if (mail){
|
||||
if (!isMailable()){
|
||||
|
@ -387,12 +381,20 @@ function downloadDocument(mail)
|
|||
}
|
||||
else{
|
||||
document.getElementById('sendmail').value="no";
|
||||
|
||||
}
|
||||
|
||||
|
||||
document.getElementById('banktype').value=banktype;
|
||||
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 New Issue