mirror of
https://github.com/FAUSheppy/flask-json-dream-website
synced 2025-12-06 08:11:35 +01:00
implement ths mobile contact
This commit is contained in:
10
combiner.py
10
combiner.py
@@ -14,7 +14,7 @@ MAP = {
|
||||
"gebaeudecheck.php" : "/content/?id=gebaeude-gebaeudecheck",
|
||||
"luftdichtheit.php" : "/content/?id=gebaeude-luftdichtheit",
|
||||
"index.php" : "/",
|
||||
"kontakt.php" : None,
|
||||
"kontakt.php" : "/contact",
|
||||
"leckageortung.php" : "/content/?id=wasserschaeden-leckageortung",
|
||||
"leitunsgsortung.php" : "/content/?id=wasserschaeden-leitungsortung",
|
||||
"schaltanlagen.php" : "/content/?id=anlagen-elektronik-schaltanlagen",
|
||||
@@ -23,7 +23,7 @@ MAP = {
|
||||
"trocknung.php" : None
|
||||
}
|
||||
|
||||
REVERSE_MAP = { "/contact": "/kontakt.php" }
|
||||
REVERSE_MAP = { "/contact" : "/kontakt.php" }
|
||||
for k,v in MAP.items():
|
||||
if not v or not "content" in v:
|
||||
continue
|
||||
@@ -54,13 +54,7 @@ for key, value in MAP.items():
|
||||
|
||||
for k in REVERSE_MAP.keys():
|
||||
if k and "href=\"" + k in l:
|
||||
if "contact" in l:
|
||||
print(l)
|
||||
print(k)
|
||||
print(REVERSE_MAP[k])
|
||||
l = l.replace("href=\"" + k, "href=\"" + REVERSE_MAP[k])
|
||||
if "kontakt" in l:
|
||||
print(l)
|
||||
f.write(l)
|
||||
f.write("\n")
|
||||
|
||||
|
||||
@@ -21,9 +21,19 @@ function submitContactForm(){
|
||||
|
||||
/* submit the form */
|
||||
xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", "/contact-api");
|
||||
xhr.open("POST", "/kontakt.php");
|
||||
xhr.onload = formSubmitFinished
|
||||
|
||||
formData = new FormData(document.getElementById("contact-form"));
|
||||
|
||||
formData.append("sinfo", "dsenda");
|
||||
formData.append("in", "");
|
||||
formData.append("anrede", "Herr/Frau");
|
||||
formData.append("vorname", "");
|
||||
formData.append("fname", formData.get("name"));
|
||||
formData.append("mail", formData.get("telefon"));
|
||||
formData.append("ma", 0);
|
||||
|
||||
xhr.send(formData);
|
||||
|
||||
}
|
||||
|
||||
@@ -13,11 +13,12 @@
|
||||
</head>
|
||||
|
||||
<body class="bg-secondary">
|
||||
<div class="mobile-display">
|
||||
{% include 'navbar.html' %}
|
||||
{% include 'progress_window.html' %}
|
||||
<div id="main-container" class="container" style="margin-top: 4vw;">
|
||||
<section class="mb-4">
|
||||
<h2 class="text-color-special h1-responsive font-weight-bold my-4">
|
||||
<h2 class="text-color-special title-responsive my-4 ths-text-cg">
|
||||
{{ conf['CONTACT_HEADLINE'] }}
|
||||
</h2>
|
||||
<p class="text-center w-responsive mx-auto mb-5"> </p>
|
||||
@@ -34,7 +35,7 @@
|
||||
</div>
|
||||
<div class="col-md-6 mt-2">
|
||||
<div class="md-form mb-0">
|
||||
<input type="text" id="email" name="email" class="form-control"
|
||||
<input type="text" id="email" name="telefon" class="form-control"
|
||||
placeholder="{{ conf['CONTACT_PLACEHOLDER_EMAIL'] }}">
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,7 +44,7 @@
|
||||
<div class="row mt-2">
|
||||
<div class="col-md-12">
|
||||
<div class="md-form mb-0">
|
||||
<input type="text" id="subject" name="subject" class="form-control"
|
||||
<input type="text" id="subject" name="betreff" class="form-control"
|
||||
placeholder="{{ conf['CONTACT_PLACEHOLDER_SUBJECT'] }}">
|
||||
</div>
|
||||
</div>
|
||||
@@ -52,7 +53,7 @@
|
||||
<div class="row mt-2">
|
||||
<div class="col-md-12">
|
||||
<div class="md-form">
|
||||
<textarea type="text" id="message" name="message" rows="10"
|
||||
<textarea type="text" id="message" name="nachricht" rows="10"
|
||||
placeholder="{{ conf['CONTACT_PLACEHOLDER_TEXTAREA'] }}"
|
||||
class="form-control md-textarea"></textarea>
|
||||
</div>
|
||||
@@ -68,13 +69,9 @@
|
||||
<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>
|
||||
{% if conf['CONTACT_EMAIL'] %}
|
||||
<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"
|
||||
<a type="button" class="btn btn-light p-3 w-100"
|
||||
href="mailto:{{ conf['CONTACT_EMAIL'] }}">{{ conf['CONTACT_EMAIL'] }}</a>
|
||||
{% endif %}
|
||||
{% if PGP_KEY %}
|
||||
<script>
|
||||
function copyPGP(){
|
||||
@@ -100,5 +97,6 @@
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user