From 8eb1d22ae34543fe24720660ce1e76779deecfcf Mon Sep 17 00:00:00 2001 From: ArtemB Date: Fri, 11 Aug 2023 12:08:22 +0300 Subject: [PATCH] 0.0.83 --- static/js/user_profile.js | 34 ++++++++++++++++++++++++++++ templates/blocks/b_user_profile.html | 3 +++ 2 files changed, 37 insertions(+) diff --git a/static/js/user_profile.js b/static/js/user_profile.js index 9b0fe54..d4907c2 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -137,6 +137,40 @@ function myProfile(el){ // // } +// function logOut() { +// +// $.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){ +// if (data.user_alerts) { +// getNewMessageSession() +// } +// console.log('data received') +// // location.href = '/profile' +// 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) +// +// } +// }); +// +// } + diff --git a/templates/blocks/b_user_profile.html b/templates/blocks/b_user_profile.html index d2dbdf8..4ed4e9e 100644 --- a/templates/blocks/b_user_profile.html +++ b/templates/blocks/b_user_profile.html @@ -31,6 +31,9 @@ Мой профиль +
+ +
{% if not page %}