Fix for firefox not working

This commit is contained in:
Kasper Rynning-Tønnesen
2018-04-26 17:15:16 +02:00
parent 64da529ec2
commit fc182882a0
4 changed files with 149 additions and 153 deletions

View File

@@ -592,6 +592,9 @@ var Helper = {
var captcha_response = grecaptcha.getResponse();
Helper.ajax({
type: "POST",
headers: {
"Content-Type": "application/json"
},
data: {
from: from,
message: message,
@@ -606,6 +609,14 @@ var Helper = {
Helper.setHtml("#contact-container", "");
Helper.setHtml("#contact-container", "Something went wrong, sorry about that. You could instead try with your own mail-client: <a title='Open in client' href='mailto:contact@zoff.me?Subject=Contact%20Zoff'>contact@zoff.me</a>")
}
}, error: function(data) {
if(data == "success"){
Helper.setHtml("#contact-container", "");
Helper.setHtml("#contact-container", "Mail has been sent, we'll be back with you shortly.")
}else{
Helper.setHtml("#contact-container", "");
Helper.setHtml("#contact-container", "Something went wrong, sorry about that. You could instead try with your own mail-client: <a title='Open in client' href='mailto:contact@zoff.me?Subject=Contact%20Zoff'>contact@zoff.me</a>")
}
}
});
}