This commit is contained in:
SBD
2024-04-12 17:29:35 +03:00
parent 7daadc816c
commit 10e8d477e5
5 changed files with 32 additions and 28 deletions

View File

@@ -750,31 +750,35 @@ function sendMessageEnter (e,id_ticket,sender,receiver){
}
}
function send_subscribe (id){
let data = {
'subscribe_id':id
}
$.ajax({
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
url: '/subscribes/subscribe_now/',
type: "POST",
// async: true,
cache: false,
processData: false,
contentType: false,
// enctype: 'json',
data: JSON.stringify(data),
success: function(data){
document.querySelector(".info_profile").innerHTML = data.html;
},
error: function (data){
document.querySelector(".info_profile").innerHTML = data.responseJSON.html;
function send_subscribe (id,for_movers,subscribe){
if (!for_movers) {
let data = {
'subscribe_id': id
}
});
$.ajax({
headers: {"X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val()},
url: '/subscribes/subscribe_now/',
type: "POST",
// async: true,
cache: false,
processData: false,
contentType: false,
// enctype: 'json',
data: JSON.stringify(data),
success: function (data) {
document.querySelector(".info_profile").innerHTML = data.html;
},
error: function (data) {
document.querySelector(".info_profile").innerHTML = data.responseJSON.html;
}
});
} else {
window.location = subscribe
}
}
var last_open_curtain = null