diff --git a/.gitea/workflows/build-and-deploy-pipeline.yaml b/.gitea/workflows/build-and-deploy-pipeline.yaml
index d753ffe..7395958 100644
--- a/.gitea/workflows/build-and-deploy-pipeline.yaml
+++ b/.gitea/workflows/build-and-deploy-pipeline.yaml
@@ -4,7 +4,6 @@ on:
push:
branches:
- main
- - kontaktformular-filter-spam
jobs:
buildAndDeploy:
diff --git a/assets/js/bestellformular.js b/assets/js/bestellformular.js
index 0467bdd..314539b 100644
--- a/assets/js/bestellformular.js
+++ b/assets/js/bestellformular.js
@@ -41,9 +41,6 @@ const textInputs = document.querySelectorAll('input[type="text"]')
const captcha = document.querySelectorAll('.captcha')
const captchaInput = document.querySelectorAll('.captcha-input')
const captchaVerifyButton = document.querySelectorAll('.captcha-verify')
-
-// Form fields
-
const botBadge = document.createElement('div')
if (debugEnabled) {
botBadge.className = 'bot-badge'
@@ -179,7 +176,7 @@ function handleSubmit(e) {
})
.then((data) => {
submitButton.disabled = true
- submitButton.innerHTML = `
+ submitButton.innerHTML = `
`
setTimeout(() => {
diff --git a/assets/js/kontaktformular.js b/assets/js/kontaktformular.js
index a47ef94..a3f63bf 100644
--- a/assets/js/kontaktformular.js
+++ b/assets/js/kontaktformular.js
@@ -43,11 +43,6 @@ const captcha = document.querySelectorAll('.captcha')
const captchaInput = document.querySelectorAll('.captcha-input')
const captchaVerifyButton = document.querySelectorAll('.captcha-verify')
const botBadge = document.createElement('div')
-
-// Form fields
-const subjectField = document.getElementById('subject')
-const messageField = document.getElementById('description')
-
if (debugEnabled) {
botBadge.className = 'bot-badge'
document.body.appendChild(botBadge)
@@ -107,9 +102,6 @@ function handleMouseMove(event) {
function checkForBotBehavior() {
let timeSpent = (Date.now() - startTime) / 1000
botDetected =
- subjectField.value === 'I promised.' ||
- // or if messageField Has string "Hi, this is" in it
- messageField.value.startsWith('Hi, this is') ||
!userInteracted ||
interactionCount === 0 ||
honeypotInput1.value !== '' ||
@@ -139,33 +131,9 @@ function checkForBotBehavior() {
' honeypotInput2:' +
honeypotInput2.value +
' verifyEmailInput:' +
- verifyEmailInput.value +
- ' subjectField:' +
- subjectField.value +
- ' messageField:' +
- messageField.value
+ verifyEmailInput.value
)
}
-
-// function logSubmission() {
-// console.log('in logSubmission()')
-// const data = { logData: 'Hi, this is some log data from JavaScript.' }
-// fetch('/php/log.php', {
-// method: 'POST',
-// headers: {
-// 'Content-Type': 'application/json',
-// },
-// body: JSON.stringify(data),
-// })
-// .then((response) => response.json())
-// .then((data) => {
-// console.log('Success:', data)
-// })
-// .catch((error) => {
-// console.error('Error:', error)
-// })
-// }
-//
function handleSubmit(e) {
e.preventDefault()
@@ -176,14 +144,11 @@ function handleSubmit(e) {
fakeOut()
return false
}
+
const formData = new FormData(form)
const formDataEncoded = new URLSearchParams(formData).toString()
const formURL = form.action + '.json'
- // logSubmission()
- // fakeOut()
- // return false
-
fetch(formURL, {
method: 'POST',
headers: {
@@ -199,7 +164,7 @@ function handleSubmit(e) {
})
.then((data) => {
submitButton.disabled = true
- submitButton.innerHTML = `
+ submitButton.innerHTML = `
`
setTimeout(() => {
@@ -224,7 +189,7 @@ function handleSubmit(e) {
}
function fakeOut() {
submitButton.disabled = true
- submitButton.innerHTML = `
+ submitButton.innerHTML = `
`
setTimeout(() => {
diff --git a/content/french/sections/footer.md b/content/french/sections/footer.md
index a975c16..68d110a 100644
--- a/content/french/sections/footer.md
+++ b/content/french/sections/footer.md
@@ -21,7 +21,7 @@ CH-8253 Diessenhofen
079 393 86 83
-support"at"verua.ch
+support@verua.ch
diff --git a/content/german/sections/footer.md b/content/german/sections/footer.md
index 799afc0..7d39497 100644
--- a/content/german/sections/footer.md
+++ b/content/german/sections/footer.md
@@ -19,7 +19,7 @@ CH-8253 Diessenhofen
079 393 86 83
-support"at"verua.ch
+support@verua.ch
@@ -42,4 +42,4 @@ support"at"verua.ch
{{% /columns %}}
-{{% /aligncenter %}}
+{{% /aligncenter %}}
\ No newline at end of file
diff --git a/static/php/ajaxmail.php b/static/php/ajaxmail.php
index 7acf297..62cbefc 100644
--- a/static/php/ajaxmail.php
+++ b/static/php/ajaxmail.php
@@ -27,7 +27,7 @@ try {
// Es handelt sich wahrscheinlich um einen Bot
$subject = 'Botverdacht - ' . $subject;
}
-
+
if (empty($name) || !filter_var($email, FILTER_VALIDATE_EMAIL) || empty($message)) {
// Invalid input
throw new Exception('Ungültige Eingabedaten.');
@@ -44,9 +44,11 @@ try {
$mail->Port = 465; // TCP port for the connection
// Recipients
- $mail->setFrom('support@verua.ch', 'Verua Support'); // Sender address
+ $mail->setFrom($email, $name); // Sender address
$mail->addAddress('ah@mediendesign-hnida.de', 'Andreas Hnida'); // Add recipient
- $mail->addAddress('support@verua.ch', 'Verua Support'); // Add another recipient
+ // $mail->addAddress('bettina.rasberger@rabe-web.ch', 'Bettina Rasberger'); // Add another recipient
+ // $mail->addAddress('norbert.wagner@verua.ch'); // Add another recipient
+ $mail->addReplyTo($email, $name); // Set reply address
$mail->addBCC('ah@mediendesign-hnida.de'); // Add bounce email address as BCC
// Content