Simple image host.
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.

123456789101112131415161718192021222324252627282930
  1. $(document).on("ready", function() {
  2. $("#register-form").on("submit", function(evt) {
  3. util.prevent(evt);
  4. var username = $("#register-username").val();
  5. var password = $("#register-password").val();
  6. var password2 = $("#register-password-repeat").val();
  7. if (password !== password2)
  8. return util.error("Paswords don't match.");
  9. if (!username)
  10. return util.error("You must supply a username.");
  11. if (!password)
  12. return util.error("You must supply a password.");
  13. util.api("account_create", {
  14. username: username,
  15. password: password
  16. }, function(err, res) {
  17. if (err)
  18. return util.error(err);
  19. display.loggedIn();
  20. util.redirect("/settings");
  21. });
  22. });
  23. });