reset-password.js 517 B

12345678910111213141516171819202122232425262728
  1. var app = new Vue({
  2. el: "#app",
  3. data: {
  4. sent: false
  5. },
  6. methods: {
  7. sendRequest: function() {
  8. let formElement = $("#reset-password-form").get(0);
  9. let formData = new FormData(formElement);
  10. $.ajax({
  11. url: "/api/validate/reset-password/",
  12. method: "POST",
  13. data: formData,
  14. cache: false,
  15. contentType: false,
  16. processData: false,
  17. success: function(data) {
  18. app.sent = true;
  19. toast.info(null, data.message, true);
  20. },
  21. error: toast.defaultAjaxError
  22. });
  23. }
  24. }
  25. });