mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Implemented recaptcha
This commit is contained in:
@@ -229,10 +229,15 @@ var Helper = {
|
||||
$("#send-loader").removeClass("hide");
|
||||
$("#contact-form-from").attr("disabled", "true");
|
||||
$("#contact-form-message").attr("disabled", "true");
|
||||
|
||||
var captcha_response = grecaptcha.getResponse();
|
||||
console.log(captcha_response);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {from: from, message: message},
|
||||
data: {
|
||||
from: from,
|
||||
message: message,
|
||||
"g-recaptcha-response": captcha_response,
|
||||
},
|
||||
url: "/api/mail",
|
||||
success: function(data){
|
||||
if(data == "success"){
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<h4>Contact</h4>
|
||||
<div id="contact-container">
|
||||
<p>Found a bug, or just want to contact the team?</p>
|
||||
<form id="contact-form" method="post" onsubmit="return false;">
|
||||
<form id="contact-form" method="post">
|
||||
<div class="input-field">
|
||||
<input id="contact-form-from" name="from" type="email" autocomplete="off" class="validate" />
|
||||
<label for="contact-form-from" class="noselect">Email</label>
|
||||
@@ -12,6 +12,7 @@
|
||||
<input id="contact-form-message" name="message" type="text" autocomplete="off">
|
||||
<label for="contact-form-message" class="noselect">Message</label>
|
||||
</div>
|
||||
{{{captcha}}}
|
||||
<div class="valign hide" id="send-loader">
|
||||
<div class="preloader-wrapper small active">
|
||||
{{> spinner}}
|
||||
|
||||
Reference in New Issue
Block a user