fix: Changed user facing text to formal speech.

This commit is contained in:
muli 2022-08-17 21:56:57 +02:00
parent 360f90fc9d
commit e2fa3f75cc
2 changed files with 7 additions and 6 deletions

View File

@ -72,7 +72,7 @@ contact_form.addEventListener('submit', function(event) {
} else if (json.status == 'ok') {
feedback.classList.remove('--error');
feedback.classList.add('--success');
feedback.textContent = "Deine Nachricht wurde erfolgreich ans Office geschickt.";
feedback.textContent = "Ihre Nachricht wurde erfolgreich ans Office geschickt.";
}
})
.catch(error => console.log(error));

View File

@ -50,13 +50,14 @@ function prepare_response() {
$response = array();
if (empty($_POST['message'])) {
$response['errors'][] = 'Du hast keine Nachricht eingegeben.';
$response['errors'][] = 'Sieh haben keine Nachricht eingegeben.';
}
if (empty($_POST['email'])) {
$response['errors'][] = 'Du hast keine E-Mail-Adresse eingegeben.';
$response['errors'][] = 'Sie haben keine E-Mail-Adresse eingegeben.';
}
if (empty($_POST['name'])) {
$response['errors'][] = 'Du hast keinen Namen eingegeben.';
$response['errors'][] = 'Sie haben keinen Namen eingegeben.';
}
}
/**
* Idee zur Bot-Erkennung:
@ -69,7 +70,7 @@ function prepare_response() {
time() - $_SESSION['start_time'] < 5 or
time() - $_SESSION['start_time'] > 3600
) {
$response['errors'][] = 'Wir glauben du bist ein Bot.';
$response['errors'][] = 'Wir glauben Sie sind ein Bot.';
}
if (!array_key_exists('errors', $response)) {
$subject = sanitize_text('subject');
@ -78,7 +79,7 @@ function prepare_response() {
$email = sanitize_text('email');
if (!send_message_to_office($subject, $message, $name, $email)) {
$response['errors'][] = 'Deine Nachricht konnte nicht übermittelt werden.';
$response['errors'][] = 'Ihre Nachricht konnte nicht übermittelt werden.';
} else {
$response['status'] = 'ok';
}