Skip to content
Snippets Groups Projects
Commit 572cf191 authored by Torben Böhnke's avatar Torben Böhnke
Browse files

update t35t

parent be50c677
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
Aus der Ferne erreichst Du uns am besten über dieses Kontaktformular.
Alternativ kannst Du uns auch eine E-Mail an [makerspace@rub.de](mailto:makerspace@rub.de) schicken.
<form method="post" action="https://feedback.ruhr-uni-bochum.de/formmailer.php" name="Kontaktformular" enctype="multipart/form-data" class="form">
<form id="contact_form" method="post" action="https://feedback.ruhr-uni-bochum.de/formmailer.php" name="Kontaktformular" enctype="multipart/form-data" class="form">
<input type="hidden" name="subject" value="Kontaktaufnahme von der Makerspace-Homepage" />
<input type="hidden" name="recipients" value="gitlab-incoming+boehntxp-test-ms-9418-issue-@ruhr-uni-bochum.de"/>
<!--
......@@ -15,41 +15,40 @@ Alternativ kannst Du uns auch eine E-Mail an [makerspace@rub.de](mailto:makerspa
<input type="hidden" name="mail_options" value="charset=UTF-8,Include=formatted_message,Exclude=vorname;nachname;email;tel;nachricht;data-privacy;realname;honigtopf;schicken;FromAddr"/>
<input type="hidden" name="good_url" value="https://makerspace.ruhr-uni-bochum.de/danke/" />
<!-- required am Ende der Felddefinition bedeutet: Eingabe ist erforderlich> -->
<h2>Kontaktformular</h2>
<input type="hidden" name="formatted_message" id="formatted_message" />
<div class="form-field">
<!-- required am Ende der Felddefinition bedeutet: Eingabe ist erforderlich> -->
<h2>Kontaktformular</h2>
<div class="form-field">
<label for="nachname"><strong>Name:</strong></label>
<input name="nachname" type="text" maxlength="30" required/>
</div>
<input id="nachname" name="nachname" type="text" maxlength="30" required/>
</div>
<div class="form-field">
<label for="vorname"><strong>Vorname:</strong></label>
<input name="vorname" type="text" maxlength="30" required/>
</div>
<input id="vorname" name="vorname" type="text" maxlength="30" required/>
</div>
<div class="form-field">
<label for="email"><strong>E-Mail:</strong></label>
<input name="email" type="email" maxlength="60" required/>
</div>
<input id="email" name="email" type="email" maxlength="60" required/>
</div>
<div class="form-field">
<label for="tel"><strong>Telefonnummer:</strong></label>
<input name="tel" type="tel" maxlength="40" placeholder="Optional" />
</div>
<input id="tel" name="tel" type="tel" maxlength="40" placeholder="Optional" />
</div>
<div class="form-field">
<label for="nachricht" id="nachricht-text"><strong>Deine Nachricht:</strong><span class='large'></span></label>
<textarea name="nachricht" maxlength="500" placeholder="Hier kannst Du Deine Nachricht schreiben (Limit: 500 Zeichen)" rows="6"></textarea>
</div>
<label for="nachricht" id="nachricht-text"><strong>Deine Nachricht:</strong></label>
<textarea id="nachricht" name="nachricht" maxlength="500" placeholder="Hier kannst Du Deine Nachricht schreiben (Limit: 500 Zeichen)" rows="6"></textarea>
</div>
<div class="honey">
<label for="honigtopf"><strong>Please do not fill this field:</strong></label>
<input name="honigtopf" type="text" maxlength="50" value="" />
</div>
<input id="honigtopf" name="honigtopf" type="text" maxlength="50" value="" />
</div>
<div class="form-field" style="margin-bottom: 10px; font-size: var(--form-note-font-size);">
<label for="data-privacy" style="font-size: var(--form-note-font-size);">
......@@ -62,35 +61,47 @@ Alternativ kannst Du uns auch eine E-Mail an [makerspace@rub.de](mailto:makerspa
</div>
</label>
</div>
<div class="form-field">
<input type="submit" class="hover" value="Kontaktformular absenden" name="schicken" />
</div>
<input type="submit" value="Kontaktformular absenden" name="schicken" />
</div>
</form>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.getElementById('Kontaktformular').addEventListener('submit', function(e) {
// Collect form values
var vorname = document.querySelector('input[name="vorname"]').value;
var nachname = document.querySelector('input[name="nachname"]').value;
var email = document.querySelector('input[name="email"]').value;
var tel = document.querySelector('input[name="tel"]').value;
var nachricht = document.querySelector('textarea[name="nachricht"]').value;
var dataPrivacyChecked = document.querySelector('input[name="data-privacy"]').checked ? 'Ja' : 'Nein';
// Build the formatted message
var formattedMessage =
"Vorname: " + vorname + "\n" +
"Nachname: " + nachname + "\n" +
"E-Mail: " + email + "\n" +
"Telefonnummer: " + tel + "\n" +
"Nachricht:\n" + nachricht + "\n" +
"Einverständnis Datenschutz: " + dataPrivacyChecked;
// Set the value of the hidden field
document.getElementById('formatted_message').value = formattedMessage;
});
});
// Debugging output to check if the script is running
console.log('Script loaded');
var form = document.getElementById('contact_form');
console.log('Form:', form);
if (form) {
form.addEventListener('submit', function(e) {
e.preventDefault(); // Prevent the default form submission
// Collect form values
var vorname = document.getElementById('vorname').value;
var nachname = document.getElementById('nachname').value;
var email = document.getElementById('email').value;
var tel = document.getElementById('tel').value;
var nachricht = document.getElementById('nachricht').value;
var dataPrivacyChecked = document.getElementById('data-privacy').checked ? 'Ja' : 'Nein';
// Build the formatted message
var formattedMessage =
"Vorname: " + vorname + " " + "\n" +
"Nachname: " + nachname + " " + "\n" +
"E-Mail: " + email + " " + "\n" +
"Telefonnummer: " + tel + " " + "\n" +
"Nachricht: " + " " + "\n" + nachricht + " " + "\n" +
"Einverständnis Datenschutz: " + dataPrivacyChecked;
// Set the value of the hidden field
document.getElementById('formatted_message').value = formattedMessage;
// Debugging output
console.log('Formatted Message:', formattedMessage);
});
} else {
console.error('Form with id "Kontaktformular" not found.');
}
</script>
\ No newline at end of file
......@@ -647,7 +647,7 @@ document.addEventListener('DOMContentLoaded', function() {
<div><h3 id="form">E-Mail und Kontaktformular</h3>
<p>Aus der Ferne erreichst Du uns am besten über dieses Kontaktformular.
Alternativ kannst Du uns auch eine E-Mail an <a href="mailto:makerspace@rub.de">makerspace@rub.de</a> schicken. </p>
<form method="post" action="https://feedback.ruhr-uni-bochum.de/formmailer.php" name="Kontaktformular" enctype="multipart/form-data" class="form">
<form id="contact_form" method="post" action="https://feedback.ruhr-uni-bochum.de/formmailer.php" name="Kontaktformular" enctype="multipart/form-data" class="form">
<input type="hidden" name="subject" value="Kontaktaufnahme von der Makerspace-Homepage">
<input type="hidden" name="recipients" value="gitlab-incoming+boehntxp-test-ms-9418-issue-@ruhr-uni-bochum.de">
<!--
......@@ -660,39 +660,38 @@ Alternativ kannst Du uns auch eine E-Mail an <a href="mailto:makerspace@rub.de">
<input type="hidden" name="good_url" value="https://makerspace.ruhr-uni-bochum.de/danke/">
<!-- required am Ende der Felddefinition bedeutet: Eingabe ist erforderlich> -->
<h2>Kontaktformular</h2>
<input type="hidden" name="formatted_message" id="formatted_message">
<!-- required am Ende der Felddefinition bedeutet: Eingabe ist erforderlich> -->
<h2>Kontaktformular</h2>
<div class="form-field">
<label for="nachname"><strong>Name:</strong></label>
<input name="nachname" type="text" maxlength="30" required>
</div>
<input id="nachname" name="nachname" type="text" maxlength="30" required>
</div>
<div class="form-field">
<label for="vorname"><strong>Vorname:</strong></label>
<input name="vorname" type="text" maxlength="30" required>
</div>
<input id="vorname" name="vorname" type="text" maxlength="30" required>
</div>
<div class="form-field">
<label for="email"><strong>E-Mail:</strong></label>
<input name="email" type="email" maxlength="60" required>
</div>
<input id="email" name="email" type="email" maxlength="60" required>
</div>
<div class="form-field">
<label for="tel"><strong>Telefonnummer:</strong></label>
<input name="tel" type="tel" maxlength="40" placeholder="Optional">
</div>
<input id="tel" name="tel" type="tel" maxlength="40" placeholder="Optional">
</div>
<div class="form-field">
<label for="nachricht" id="nachricht-text"><strong>Deine Nachricht:</strong><span class="large"></span></label>
<textarea name="nachricht" maxlength="500" placeholder="Hier kannst Du Deine Nachricht schreiben (Limit: 500 Zeichen)" rows="6"></textarea>
</div>
<label for="nachricht" id="nachricht-text"><strong>Deine Nachricht:</strong></label>
<textarea id="nachricht" name="nachricht" maxlength="500" placeholder="Hier kannst Du Deine Nachricht schreiben (Limit: 500 Zeichen)" rows="6"></textarea>
</div>
<div class="honey">
<label for="honigtopf"><strong>Please do not fill this field:</strong></label>
<input name="honigtopf" type="text" maxlength="50" value="">
<input id="honigtopf" name="honigtopf" type="text" maxlength="50" value="">
</div>
<div class="form-field" style="margin-bottom: 10px; font-size: var(--form-note-font-size);">
......@@ -707,36 +706,48 @@ Alternativ kannst Du uns auch eine E-Mail an <a href="mailto:makerspace@rub.de">
</label>
</div>
<div class="form-field">
<input type="submit" class="hover" value="Kontaktformular absenden" name="schicken">
</div>
<input type="submit" value="Kontaktformular absenden" name="schicken">
</div>
</form>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.getElementById('Kontaktformular').addEventListener('submit', function(e) {
// Collect form values
var vorname = document.querySelector('input[name="vorname"]').value;
var nachname = document.querySelector('input[name="nachname"]').value;
var email = document.querySelector('input[name="email"]').value;
var tel = document.querySelector('input[name="tel"]').value;
var nachricht = document.querySelector('textarea[name="nachricht"]').value;
var dataPrivacyChecked = document.querySelector('input[name="data-privacy"]').checked ? 'Ja' : 'Nein';
// Build the formatted message
var formattedMessage =
"Vorname: " + vorname + "\n" +
"Nachname: " + nachname + "\n" +
"E-Mail: " + email + "\n" +
"Telefonnummer: " + tel + "\n" +
"Nachricht:\n" + nachricht + "\n" +
"Einverständnis Datenschutz: " + dataPrivacyChecked;
// Set the value of the hidden field
document.getElementById('formatted_message').value = formattedMessage;
});
});
// Debugging output to check if the script is running
console.log('Script loaded');
var form = document.getElementById('contact_form');
console.log('Form:', form);
if (form) {
form.addEventListener('submit', function(e) {
e.preventDefault(); // Prevent the default form submission
// Collect form values
var vorname = document.getElementById('vorname').value;
var nachname = document.getElementById('nachname').value;
var email = document.getElementById('email').value;
var tel = document.getElementById('tel').value;
var nachricht = document.getElementById('nachricht').value;
var dataPrivacyChecked = document.getElementById('data-privacy').checked ? 'Ja' : 'Nein';
// Build the formatted message
var formattedMessage =
"Vorname: " + vorname + " " + "\n" +
"Nachname: " + nachname + " " + "\n" +
"E-Mail: " + email + " " + "\n" +
"Telefonnummer: " + tel + " " + "\n" +
"Nachricht: " + " " + "\n" + nachricht + " " + "\n" +
"Einverständnis Datenschutz: " + dataPrivacyChecked;
// Set the value of the hidden field
document.getElementById('formatted_message').value = formattedMessage;
// Debugging output
console.log('Formatted Message:', formattedMessage);
});
} else {
console.error('Form with id "Kontaktformular" not found.');
}
</script></div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment