Removed token.min.js from github, fixed issue with embedded player playing even when not supposed to, and fixed faulty error-message when applying to get a token

This commit is contained in:
Kasper Rynning-Tønnesen
2018-03-04 12:10:48 +01:00
parent 99f737d0b3
commit 786a6e0b5a
8 changed files with 65 additions and 23 deletions

View File

@@ -23,13 +23,12 @@ $(document).ready(function() {
},
success: function(response) {
$(".full-form-token").addClass("hide");
if(response != "OK") {
if(response == "success") {
Materialize.toast("Email sent!", 3000, "green lighten");
} else {
$("#email_address").attr("readonly", true);
$(".submit").toggleClass("disabled");
Materialize.toast("Couldn't send email.", 3000, "red lighten");
} else {
Materialize.toast("Email sent!", 3000, "green lighten");
grecaptcha.reset();
Materialize.toast("Something went wrong. Sure that email hasn't been used for another token?", 3000, "red lighten");
}
},
error: function(response) {