This commit is contained in:
2023-07-28 18:33:54 +03:00
parent a0113542c0
commit 45234121d4

View File

@@ -41,7 +41,9 @@ function sendRoute(el){
//cleaning route inputs after selection changes
function OnSelectionChange() {
function OnSelectionChange(el) {
let form = el.form;
let formData = new FormData(form);
$.ajax({
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
url: '/ru/user_account/new_route_view/',
@@ -51,7 +53,7 @@ function OnSelectionChange() {
processData: false,
contentType: false,
// enctype: 'json',
// data: {},
data: formData,
success: function(data){
// console.log('data received')
// location.href = '/profile'