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.
 
 
 
 
 

39 lines
998 B

$(function () {
function submitForm() {
var base = document.getElementById("base-url").getAttribute("href").slice(0, -1);
var email = $("#signup-email").val();
try {
var tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
} catch(err) {
var tz = "UTC";
}
$("#signup-go").prop("disabled", true);
$.ajax({
url: base + "/accounts/signup/",
type: "post",
data: {"identity": email, "tz": tz},
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()
})
});