fix contact form missing fields

This commit is contained in:
Yannik Schmidt
2020-09-10 23:57:35 +02:00
parent c6c6a5e538
commit 326ef423af
2 changed files with 17 additions and 2 deletions

View File

@@ -1,5 +1,19 @@
function submitContactForm(){
/* check input fields */
mailField = document.getElementById("email")
messageField = document.getElementById("message")
if(mailField.value == ""){
alert("Bitte geben Sie einen Kontakt an unter dem wir Sie erreichen können!")
return
}
if(messageField.value == ""){
alert("Nachricht ist leer!")
return
}
/* show the waiting dialog */
dialog = document.getElementById("waiting-dialog")
dialog.style.disply = "block"

View File

@@ -67,9 +67,10 @@
<div class="border p-3 col-md-3 text-center bg-special">
<ul class="list-unstyled mb-0">
<li><i class="fas fa-envelope mt-4 fa-2x"></i>
<p>Wir freuen uns auf ihre Nachricht!</p></br>
<p>Wir freuen uns auf Ihre Nachricht!</p>
{% if conf['CONTACT_EMAIL'] %}
<p>Selbsverständlich können sie uns auch per Mail kontaktieren.</p></br>
<hr>
<p>Natürlich können Sie uns auch direkt per Mail kontaktieren.</p></br>
<a type="button" class="btn btn-light p-3 w-75"
href="mailto:{{ conf['CONTACT_EMAIL'] }}">{{ conf['CONTACT_EMAIL'] }}</a>
{% endif %}