added captcha form input
Κάποιοι έλεγχοι απέτυχαν
Hellug Projects/Hellug/www/pipeline/head There was a failure building this commit
Κάποιοι έλεγχοι απέτυχαν
Hellug Projects/Hellug/www/pipeline/head There was a failure building this commit
Αυτό το commit περιλαμβάνεται σε:
γονέας
6a3488c5e0
commit
8d805f871a
1 αρχεία άλλαξαν με 17 προσθήκες και 3 διαγραφές
|
@ -7,18 +7,32 @@ category_title: Μέλη
|
||||||
---
|
---
|
||||||
|
|
||||||
<form id="subscriptionemail">
|
<form id="subscriptionemail">
|
||||||
Για να ενημερωθείτε μέσω e-mail για τυχών ταμειακές εκκρεμότητες παρακαλώ συμπληρώστε τη παρακάτω φόρμα<br/>
|
<p>Για να ενημερωθείτε μέσω e-mail για τυχών ταμειακές εκκρεμότητες παρακαλώ συμπληρώστε τη παρακάτω φόρμα</p>
|
||||||
<label for="email">Tο email: </label><input type="text" name="email" /> (όπως το είχατε δώσει στην εγγραφή σας) <br/>
|
<label for="email">Tο email: </label><input type="text" name="email" /> (όπως το είχατε δώσει στην εγγραφή σας) <br/>
|
||||||
|
<p><img id=captchaimage src="" alt="Captcha">Εισάγετε τα ψηφία της εικόνας παρακάτω</p>
|
||||||
|
<input type="hidden" id=captchahidden name=Id value="">
|
||||||
|
<input name=Solution id=solution></br>
|
||||||
<input type="submit" value="Υποβολή"/>
|
<input type="submit" value="Υποβολή"/>
|
||||||
<div id="response"></div>
|
<div id="response"></div>
|
||||||
</form>
|
</form>
|
||||||
<script>
|
<script>
|
||||||
|
async function captchaid() {
|
||||||
|
await fetch('/api/captcha/')
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(id => {
|
||||||
|
console.log("id="+id);
|
||||||
|
document.getElementById('captchahidden').value = id.toString();
|
||||||
|
document.getElementById('captchaimage').src = '/api/captcha/'+id.toString()+'/captcha.png'; });
|
||||||
|
};
|
||||||
|
|
||||||
|
captchaid();
|
||||||
subscriptionemail.onsubmit = async (e) => {
|
subscriptionemail.onsubmit = async (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var form = document.querySelector("#subscriptionemail");
|
var form = document.querySelector("#subscriptionemail");
|
||||||
data = {
|
data = {
|
||||||
email : form.querySelector('input[name="email"]').value
|
email : form.querySelector('input[name="email"]').value,
|
||||||
|
id : form.querySelector('input[name="Id"]').value,
|
||||||
|
solution : form.querySelector('input[name="Solution"]').value
|
||||||
}
|
}
|
||||||
let response = await fetch('/api/sendSubscriptionEmail', {
|
let response = await fetch('/api/sendSubscriptionEmail', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
Φόρτωση…
Προσθήκη πίνακα
Προσθήκη υπερσυνδέσμου
Παράθεση σε νέο ζήτημα