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.

22 lines
694 B

  1. $(function () {
  2. $("#signup-go").on("click", function() {
  3. var base = document.getElementById("base-url").getAttribute("href").slice(0, -1);
  4. var email = $("#signup-email").val();
  5. var token = $('input[name=csrfmiddlewaretoken]').val();
  6. $("#signup-go").prop("disabled", true);
  7. $.ajax({
  8. url: base + "/accounts/signup/",
  9. type: "post",
  10. headers: {"X-CSRFToken": token},
  11. data: {"identity": email},
  12. success: function(data) {
  13. $("#signup-result").html(data).show();
  14. $("#signup-go").prop("disabled", false);
  15. }
  16. });
  17. return false;
  18. });
  19. });