95 lines
2.5 KiB
JavaScript
95 lines
2.5 KiB
JavaScript
function writeMessage(){
|
|
$.ajax({
|
|
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
|
url: '/ru/user_account/new_msg_to_user/',
|
|
type: "POST",
|
|
// async: true,
|
|
cache: false,
|
|
processData: false,
|
|
contentType: false,
|
|
// enctype: 'json',
|
|
// data: formData,
|
|
success: function(data){
|
|
// location.href = '/profile'
|
|
document.querySelector(".info_profile").innerHTML = data.html;
|
|
|
|
|
|
},
|
|
error: function (data, exception){
|
|
console.log(400)
|
|
|
|
}
|
|
});
|
|
}
|
|
function technicalSupport(){
|
|
$.ajax({
|
|
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
|
url: '/ru/user_account/new_msg_to_support/',
|
|
type: "POST",
|
|
// async: true,
|
|
cache: false,
|
|
processData: false,
|
|
contentType: false,
|
|
// enctype: 'json',
|
|
// data: formData,
|
|
success: function(data){
|
|
console.log('data received')
|
|
// location.href = '/profile'
|
|
document.querySelector(".info_profile").innerHTML = data.html;
|
|
|
|
|
|
},
|
|
error: function (data, exception){
|
|
console.log(400)
|
|
|
|
}
|
|
});
|
|
}
|
|
function mySubscription(){
|
|
$.ajax({
|
|
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
|
url: '/ru/user_account/subscribe/',
|
|
type: "POST",
|
|
// async: true,
|
|
cache: false,
|
|
processData: false,
|
|
contentType: false,
|
|
// enctype: 'json',
|
|
// data: formData,
|
|
success: function(data){
|
|
console.log('data received')
|
|
// location.href = '/profile'
|
|
document.querySelector(".info_profile").innerHTML = data.html;
|
|
|
|
|
|
},
|
|
error: function (data, exception){
|
|
console.log(400)
|
|
|
|
}
|
|
});
|
|
}
|
|
function myProfile(){
|
|
$.ajax({
|
|
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
|
url: '/ru/user_account/change_profile/',
|
|
type: "POST",
|
|
// async: true,
|
|
cache: false,
|
|
processData: false,
|
|
contentType: false,
|
|
// enctype: 'json',
|
|
// data: formData,
|
|
success: function(data){
|
|
console.log('data received')
|
|
// location.href = '/profile'
|
|
document.querySelector(".info_profile").innerHTML = data.html;
|
|
|
|
|
|
},
|
|
error: function (data, exception){
|
|
console.log(400)
|
|
|
|
}
|
|
});
|
|
} |