You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

35 lines
950 B

$(function () {
function submitForm() {
var base = document.getElementById("base-url").getAttribute("href").slice(0, -1);
var email = $("#signup-email").val();
var token = $('input[name=csrfmiddlewaretoken]').val();
$("#signup-go").prop("disabled", true);
$.ajax({
url: base + "/accounts/signup/",
type: "post",
headers: {"X-CSRFToken": token},
data: {"identity": email},
success: function(data) {
$("#signup-result").html(data).show();
$("#signup-go").prop("disabled", false);
}
});
return false;
}
$("#signup-go").on("click", submitForm);
$("#signup-email").keypress(function (e) {
if (e.which == 13) {
return submitForm();
}
});
$("#signup-modal").on('shown.bs.modal', function () {
$("#signup-email").focus()
})
});