Bestellformular freiberufliche implementiert, phpmailer implementiert, captcha implementiert
This commit is contained in:
parent
3217c0a202
commit
c004ebe4db
2 changed files with 200 additions and 16 deletions
|
|
@ -149,6 +149,68 @@ table .far {
|
|||
.content table {
|
||||
font-size:1em;
|
||||
}
|
||||
|
||||
/* Formular */
|
||||
#bestellformular {
|
||||
max-width: 64rem;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
#bestellformular div {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
#bestellformular label {
|
||||
display: block;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
color: #4B5563;
|
||||
}
|
||||
|
||||
#bestellformular select,
|
||||
#bestellformular input,
|
||||
#bestellformular textarea {
|
||||
width: 100%;
|
||||
padding: 0.5rem 1rem;
|
||||
border: 1px solid #D1D5DB;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
#bestellformular select:focus,
|
||||
#bestellformular input:focus,
|
||||
#bestellformular textarea:focus {
|
||||
outline: none;
|
||||
border-color: #3B82F6;
|
||||
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
|
||||
}
|
||||
|
||||
#bestellformular button {
|
||||
width:350px;
|
||||
padding: 0.5rem 1rem;
|
||||
margin-bottom:10px;
|
||||
margin-top:10px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
background-color: #3B82F6;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
#bestellformular .submitbutton{
|
||||
background-color: #a9cd2e;
|
||||
align-self: center;
|
||||
width:100%;
|
||||
}
|
||||
#bestellformular button:hover {
|
||||
background-color: #2563EB;
|
||||
}
|
||||
#bestellformular .submitbutton:hover{
|
||||
background-color: #88a625;
|
||||
}
|
||||
.captcha-container {
|
||||
box-shadow: none!important;
|
||||
}
|
||||
/**** Utility *****/
|
||||
.aligncenter * {
|
||||
text-align: center;
|
||||
|
|
|
|||
|
|
@ -3,22 +3,144 @@ date = '2024-02-21T08:49:32Z'
|
|||
draft = false
|
||||
title = 'Freiberufliche'
|
||||
+++
|
||||
{{% veruaslider %}}
|
||||
{{% slide image="../bestellungen-header.jpg" first="true " %}}
|
||||
{{% /veruaslider %}}
|
||||
{{% section %}}
|
||||
{{% aligncenter %}}
|
||||
#### Bestellformular
|
||||
## VeruA ** Verwaltung und Abrechnung
|
||||
### Freiberufliche
|
||||
<br>
|
||||
|
||||
<form action="https://verua.dev-1.andreashnida.de/mail.php" method="POST" class="max-w-md mx-auto">
|
||||
<div class="mb-4">
|
||||
<label for="name" class="block mb-2 text-sm font-medium text-gray-700">Name</label>
|
||||
<input type="text" id="name" name="name" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-blue-500 focus:border-blue-500" required>
|
||||
---
|
||||
|
||||
<br>
|
||||
|
||||
{{% /aligncenter %}}
|
||||
|
||||
<form action="https://verua.dev-1.andreashnida.de/ajaxmail.php" method="POST" id="bestellformular">
|
||||
<div id="formPartOne">
|
||||
<div>
|
||||
<label for="gender">Gender</label>
|
||||
<select id="gender" name="gender" required>
|
||||
<option value="frau">Frau</option>
|
||||
<option value="mann">Mann</option>
|
||||
<option value="divers">Divers</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label for="email" class="block mb-2 text-sm font-medium text-gray-700">Email</label>
|
||||
<input type="email" id="email" name="email" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-blue-500 focus:border-blue-500" required>
|
||||
<div>
|
||||
<label for="name">Name</label>
|
||||
<input type="text" id="name" name="name" required>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label for="message" class="block mb-2 text-sm font-medium text-gray-700">Message</label>
|
||||
<textarea id="message" name="message" rows="4" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-blue-500 focus:border-blue-500" required></textarea>
|
||||
<div>
|
||||
<label for="vorname">Vorname</label>
|
||||
<input type="text" id="vorname" name="vorname" required>
|
||||
</div>
|
||||
<button type="submit" class="w-full px-4 py-2 bg-blue-500 rounded-md hover:bg-blue-600">Submit</button>
|
||||
<div>
|
||||
<label for="strasse">Strasse</label>
|
||||
<input type="text" id="strasse" name="strasse" required>
|
||||
</div>
|
||||
<div>
|
||||
<label for="plz_ort">PLZ Ort</label>
|
||||
<input type="text" id="plz_ort" name="plz_ort" required>
|
||||
</div>
|
||||
<div>
|
||||
<label for="telefon">Telefon</label>
|
||||
<input type="text" id="telefon" name="telefon" required>
|
||||
</div>
|
||||
<div>
|
||||
<label for="email">Email</label>
|
||||
<input type="email" id="email" name="email" required>
|
||||
</div>
|
||||
<div>
|
||||
<label for="message">Message</label>
|
||||
<textarea id="message" name="message" rows="4" required></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<label for="zsr_nummer">ZSR Nummer</label>
|
||||
<input type="text" id="zsr_nummer" name="zsr_nummer" required>
|
||||
</div>
|
||||
</div>
|
||||
<div id="formPartTwo">
|
||||
<div>
|
||||
<label for="bestehend">Wünschen Sie einen neuer Server oder den Zugang zu einem bestehenden Team-Server?</label>
|
||||
<select id="bestehend" name="bestehend" required>
|
||||
<option value="Applikation und Zugang zu bestehendem Team-Server">Applikation und Zugang zu bestehendem Team-Server (1'296 CHF)</option>
|
||||
<option value="Applikation und neuer Webserver">Applikation und neuer Webserver (1'296 CHF)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label for="servername">Bitte geben Sie den Namen des Servers an. Der Zugriff erfolgt immer über die Web-Adresse: https://<strong>wunschname</strong>.verua.ch</label>
|
||||
<input type="url" id="servername" name="servername" placeholder="https://wunschname.verua.ch" required>
|
||||
</div>
|
||||
<div>
|
||||
<label for="modulpop2">Wünschen Sie die Erweiterung um das Modul POP2?</label>
|
||||
<select id="modulpop2" name="modulpop2" required>
|
||||
<option value="Nein, nur das Standard-Programm">Nein, nur das Standard-Programm</option>
|
||||
<option value="Ja, ich bestelle das Zusatzmodul POP2 für 42.00 CHF jährlich, Bereitstellungskosten einmalig 438.00 CHF">Ja, ich bestelle das Zusatzmodul POP2 für 42.00 CHF jährlich, Bereitstellungskosten einmalig 438.00 CHF</option>
|
||||
<option value="Ich bin mir noch nicht sicher.">Ich bin mir noch nicht sicher.</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label for="materialverwaltung">Benötigen Sie das Zusatzmodul Materialverwaltung?</label>
|
||||
<select id="materialverwaltung" name="materialverwaltung" required>
|
||||
<option value="Nein, nur das Standard-Programm">Nein, nur das Standard-Programm</option>
|
||||
<option value="Ja, ich bestelle das Zusatzmodul Materialverwaltung für 138.00 CHF jährlich, Bereitstellungskosten einmalig 342.00 CHF">Ja, ich bestelle das Zusatzmodul Materialverwaltung für 138.00 CHF jährlich, Bereitstellungskosten einmalig 342.00 CHF</option>
|
||||
<option value="Ich bin mir noch nicht sicher.">Ich bin mir noch nicht sicher.</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label for="qrcode">Wünschen Sie die Erweiterung um das Modul QR-Code?</label>
|
||||
<select id="qrcode" name="qrcode" required>
|
||||
<option value="Nein, nur das Standard-Programm">Nein, nur das Standard-Programm</option>
|
||||
<option value="Ja, ich bestelle das Zusatzmodul Materialverwaltung für 138.00 CHF jährlich, Bereitstellungskosten einmalig 342.00 CHF">Ja, ich bestelle das Zusatzmodul Materialverwaltung für 138.00 CHF jährlich, Bereitstellungskosten einmalig 342.00 CHF</option>
|
||||
<option value="Ich bin mir noch nicht sicher.">Ich bin mir noch nicht sicher.</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label for="wochenbett">Benötigen Sie das Programm für Wochenbett-Betreuung?</label>
|
||||
<select id="wochenbett" name="wochenbett" required>
|
||||
<option value="Nein">Nein</option>
|
||||
<option value="Ja, ich möchte die Wochenbett-Version">Ja, ich möchte die Wochenbett-Version</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label for="anmerkung">Anmerkung</label>
|
||||
<textarea id="anmerkung" name="anmerkung" rows="4" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class ="captcha-container"></div>
|
||||
<button type="submit" class="submitbutton text-white mx-auto submit-after-valid-captcha">Submit</button>
|
||||
</form>
|
||||
|
||||
{{% /section %}}
|
||||
<div id="notification" class="mt-10 bg-blue-500 px-4 py-2 text-white hidden rounded">Notification</div>
|
||||
<link rel="stylesheet" href="https://verua.dev-1.andreashnida.de/vendor/captcha-system/css/main.css">
|
||||
<script src = 'https://verua.dev-1.andreashnida.de/vendor/captcha-system/js/main.js'></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
document.getElementById('bestellformular').addEventListener('submit', function(e) {
|
||||
e.preventDefault(); // Verhindert die Standard-Formularsendung
|
||||
const form = e.target;
|
||||
const data = new FormData(form);
|
||||
const notification = document.getElementById('notification');
|
||||
fetch(form.action, {
|
||||
method: 'POST',
|
||||
body: data,
|
||||
})
|
||||
.then(response => response.json()) // Erwartet, dass die Antwort ein JSON ist
|
||||
.then(data => {
|
||||
// Erfolgsnachricht anzeigen
|
||||
notification.textContent = 'Nachricht erfolgreich gesendet!';
|
||||
notification.className = 'bg-green-500 text-white px-4 py-2 rounded block';
|
||||
setTimeout(() => notification.className = 'bg-green-500 text-white px-4 py-2 rounded hidden', 5000); // Benachrichtigung nach 5 Sekunden ausblenden
|
||||
})
|
||||
.catch((error) => {
|
||||
// Fehlermeldung anzeigen
|
||||
notification.textContent = 'Fehler beim Senden der Nachricht.';
|
||||
notification.className = 'bg-red-500 text-white px-4 py-2 rounded block';
|
||||
setTimeout(() => notification.className = 'bg-red-500 text-white px-4 py-2 rounded hidden', 5000); // Benachrichtigung nach 5 Sekunden ausblenden
|
||||
});
|
||||
});
|
||||
};
|
||||
</script>
|
||||
{{% /section %}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue