This commit is contained in:
2023-07-31 17:12:50 +03:00
parent 95eeea181c
commit 54282c137c
4 changed files with 74 additions and 3 deletions

View File

@@ -27,4 +27,29 @@ function countLetters () {
else {
area.setAttribute("disabled","disabled")
}
}
function attachFileCreateTicket () {
event.preventDefault()
let input = document.querySelector(".create-ticket-file")
input.click()
console.log("asd")
let data = input.value
$.ajax({
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
url: '/ru/user_account/support_create_ticket_ajax/',
type: "POST",
// async: true,
cache: false,
processData: false,
contentType: false,
// enctype: 'json',
data: data,
success: function(data){
document.querySelector(".insert-tech-place").innerHTML = data.html;
},
});
}