This commit is contained in:
2023-08-11 12:31:54 +03:00
parent 94feb77a71
commit dd761941cf
2 changed files with 33 additions and 35 deletions

View File

@@ -137,39 +137,37 @@ function myProfile(el){
// //
// } // }
// function logOut() { function logOut() {
//
// $.ajax({ $.ajax({
// headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() }, headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
// url: '/ru/user_account/change_profile/', url: '/ru/user_account/change_profile/',
// type: "POST", type: "POST",
// // async: true, // async: true,
// cache: false, cache: false,
// processData: false, processData: false,
// contentType: false, contentType: false,
// // enctype: 'json', // enctype: 'json',
// // data: formData, // data: formData,
// success: function(data){ success: function(data){
// if (data.user_alerts) { if (data.user_alerts) {
// getNewMessageSession() getNewMessageSession()
// } }
// console.log('data received') console.log('data received')
// // location.href = '/profile' // location.href = '/profile'
// document.querySelector(".info_profile").innerHTML = data.html; document.querySelector(".info_profile").innerHTML = data.html;
//
// let list_div = document.querySelectorAll('.menu_profile div');
// list_div.forEach(el=>{ el.classList.remove('selected'); });
// el.classList.add('selected')
// },
// error: function (data, exception){
// }, console.log(400)
// error: function (data, exception){
// console.log(400) }
// });
// }
// }); }
//
// }

View File

@@ -31,8 +31,8 @@
<img class="svg" src="/static/img/svg/User.svg"> <img class="svg" src="/static/img/svg/User.svg">
<a href="#">Мой профиль</a> <a href="#">Мой профиль</a>
</div> </div>
<div onclick="logOut()"> <div>
<a href="#"></a> <a href="/user_account/profile/logout">Выйти из профиля</a>
</div> </div>
</div> </div>
<div class="info_profile"> <div class="info_profile">