Files
account_store/static/js/header.js
2023-06-22 17:34:26 +03:00

26 lines
634 B
JavaScript

function SendRegistrationForm(el){
event.preventDefault()
let form = el.form;
let formData = new FormData(form);
$.ajax({
headers: { "X-CSRFToken": '{{csrf_token}}' },
url: '/ru/user_account/registration/',
type: "POST",
// async: true,
cache: false,
processData: false,
contentType: false,
// enctype: 'json',
data: formData,
success: function(data){
// location.href = '/'
},
error: function (data, exception){
document.querySelector(".registration").innerHTML = data.html
}
});
}