handle undert twelve
This commit is contained in:
@@ -6,6 +6,11 @@
|
||||
npx http-server
|
||||
|
||||
|
||||
# Run php.exe test server:
|
||||
|
||||
C:\Users\gulum\OneDrive\Desktop\php\php.exe -S localhost:8000
|
||||
|
||||
|
||||
Thanks for downloading this theme!
|
||||
|
||||
## Other Useful Links
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
if (isset($_POST['submit'])) {
|
||||
$name = $_REQUEST['fname'];
|
||||
$email = $_REQUEST['email'];
|
||||
$email = "test@test.de"; //$_REQUEST['email'];
|
||||
$message = $_REQUEST['message'];
|
||||
|
||||
// Set your email address where you want to receive emails.
|
||||
@@ -11,4 +10,4 @@
|
||||
$send_email = mail($to,$subject,$message,$headers);
|
||||
|
||||
echo ($send_email) ? 'success' : 'error';
|
||||
}?>
|
||||
?>
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8b36505be866c271ca1c559b3bcb4b739bfb6d9ba55d92267a439ae7f64007cc
|
||||
size 166777
|
||||
oid sha256:21005fed52833c74bc205a1612a927a2f67cea0d0b6435084ab472432eaa4bc9
|
||||
size 30135
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:27cf963c9543c1029ea236adffa1127389ef6c4067a8d3869396d12b02a1402a
|
||||
size 2750814
|
||||
oid sha256:f5fda47e0ccf211d96b6f6dbdd8d8ef4d784df45881d6c544e33e9565ff08d43
|
||||
size 84998
|
||||
|
||||
BIN
images/Fotoshooting.JPG
LFS
BIN
images/Fotoshooting.JPG
LFS
Binary file not shown.
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e5ac99afd944feca3ad4e0afe44aa37ada74cb195346a97c3cb742c3d1445778
|
||||
size 4955034
|
||||
oid sha256:0e0cc51b6328260f5d07ff5a5b19902026c9f62ff7cf3e5c360d1730b60de7cd
|
||||
size 88128
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c9a0093d36ccb374f6b6623149b010431aa665102301c86aa4a24f25fdc6d84d
|
||||
size 22588999
|
||||
oid sha256:da0e37f88022403babab49047d8c3de3d27ab71b957b5d078fdded1cbede8e0f
|
||||
size 90542
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bc0c8d49ba678d4e612a13982fa25784e072ccf19d2ba0400e5909b53903eb06
|
||||
size 3779484
|
||||
oid sha256:026c5f7c9a42e7f39ce6da62961ad2fb3643947ad1ad955486cf17b824087dd9
|
||||
size 120736
|
||||
|
||||
BIN
images/catering.jpg
LFS
BIN
images/catering.jpg
LFS
Binary file not shown.
14
index.html
14
index.html
@@ -105,20 +105,20 @@
|
||||
<div class="couple-wrap animate-box">
|
||||
<div class="couple-half">
|
||||
<div class="groom">
|
||||
<img src="images/Julian.png" alt="groom" class="img-responsive">
|
||||
<img src="images/Draga.png" alt="groom" class="img-responsive">
|
||||
</div>
|
||||
<div class="desc-groom">
|
||||
<h3>Julian Nießner</h3>
|
||||
<h3>Drazena Rimac</h3>
|
||||
<p>Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove</p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="heart text-center"><i class="icon-heart2"></i></p>
|
||||
<div class="couple-half">
|
||||
<div class="bride">
|
||||
<img src="images/Draga.png" alt="groom" class="img-responsive">
|
||||
<img src="images/Julian.png" alt="groom" class="img-responsive">
|
||||
</div>
|
||||
<div class="desc-bride">
|
||||
<h3>Drazena Rimac</h3>
|
||||
<h3>Julian Nießner</h3>
|
||||
<p>Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -135,18 +135,18 @@
|
||||
<div class="row form-group">
|
||||
<div class="col-md-12">
|
||||
<label for="fname">Familienname</label>
|
||||
<input type="text" id="fname" name="fname" class="form-control" placeholder="Your firstname">
|
||||
<input type="text" id="fname" name="fname" class="form-control js-form-input" placeholder="Your firstname">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row form-group">
|
||||
<div class="col-md-12">
|
||||
<label for="message">Nachricht</label>
|
||||
<textarea name="message" id="message" cols="30" rows="10" class="form-control" placeholder="Write us something"></textarea>
|
||||
<textarea name="message" id="message" cols="30" rows="10" class="form-control js-form-input" placeholder="Write us something"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" id="finalSubmit" value="Absenden" class="btn btn-primary">
|
||||
<input type="submit" id="js-submitbtn" value="Absenden" class="btn btn-primary">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
70
js/main.js
70
js/main.js
@@ -371,17 +371,59 @@
|
||||
}());
|
||||
|
||||
|
||||
document.getElementById("finalSubmit").addEventListener("click", async function () {
|
||||
var form = document.getElementById("attendForm");
|
||||
const formattedFormData = new FormData(form);
|
||||
//formattedFormData.append('property', 'value');
|
||||
const response = await fetch('email.php',{
|
||||
method: 'POST',
|
||||
body: formattedFormData
|
||||
});
|
||||
const data = await response.text();
|
||||
//This should later print out the values submitted through the form
|
||||
console.log(data);
|
||||
document.getElementById("js-submitbtn").addEventListener("click", async function () {
|
||||
event.preventDefault();
|
||||
|
||||
let inputs = document.querySelectorAll('.js-form-input');
|
||||
|
||||
console.log(inputs);
|
||||
let from = inputs[0].value;
|
||||
let message = inputs[1].value;
|
||||
|
||||
if(StringLengthLT2(from))
|
||||
{
|
||||
SubmitError("Name too short!");
|
||||
return;
|
||||
}
|
||||
|
||||
if(StringLengthLT2(message))
|
||||
{
|
||||
SubmitError("message too short!");
|
||||
return;
|
||||
}
|
||||
|
||||
let contact = {
|
||||
from: from,
|
||||
email: "none",
|
||||
message: message,
|
||||
};
|
||||
|
||||
const response = await fetch("https://rismer.de:9999/contact", {
|
||||
method: 'POST', // *GET, POST, PUT, DELETE, etc.
|
||||
mode: 'cors', // no-cors, *cors, same-origin
|
||||
cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached
|
||||
//credentials: 'same-origin', // include, *same-origin, omit
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
redirect: 'follow', // manual, *follow, error
|
||||
referrerPolicy: 'no-referrer', // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url
|
||||
body: JSON.stringify(contact) // body data type must match "Content-Type" header
|
||||
}).catch(function (timeout) { SubmitError("API error. Call the phone number."); });
|
||||
|
||||
console.log("Request: " + JSON.stringify(contact));
|
||||
|
||||
if(response.ok)
|
||||
{
|
||||
let jsonResponse = await response.json();
|
||||
console.log("Response: " + jsonResponse);
|
||||
SubmitSuccess();
|
||||
}
|
||||
else
|
||||
{
|
||||
SubmitError();
|
||||
}
|
||||
});
|
||||
|
||||
// document.getElementById("js-submitbtn").addEventListener("click", async function () {
|
||||
@@ -527,8 +569,8 @@ document.getElementById("finalSubmit").addEventListener("click", async function
|
||||
}
|
||||
|
||||
async function SubmitSuccess() {
|
||||
let title = 'Teilgenommen';
|
||||
let text = "Wir freuen uns auf euch!";
|
||||
let title = 'Rückgemeldet';
|
||||
let text = "Nun gibt es kein zurück mehr!";
|
||||
title = await translator.getTranslationByKey(document.documentElement.lang,"success_title");
|
||||
text = await translator.getTranslationByKey(document.documentElement.lang,"success_text");
|
||||
|
||||
@@ -543,8 +585,6 @@ document.getElementById("finalSubmit").addEventListener("click", async function
|
||||
//document.querySelector('#myfrm').submit(); // manully submit
|
||||
}).catch(function (timeout) { });
|
||||
|
||||
document.getElementById("attentant-container").remove();
|
||||
document.getElementById("overnight-div").remove();
|
||||
document.getElementById("js-submitbtn").disabled = 'true';
|
||||
document.getElementById("js-submitbtn").textContent = await translator.getTranslationByKey(document.documentElement.lang,"already_participating");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user